I have seen this stack overflow question and looked at the answers that say the source code is on GitHub here. However when I browse the source I can't find the NetTCPIP "module" or any of the cmdlets in it. Searching GitHub for New-NetIPAddress doesn't come up with anything either. I have seen some answers having to do with writing more powershell to reflect on the command you want, but I haven't been able to get any of it to work yet. I am a C# programmer and I don't know powershell. I'm really just trying to find the API to add an IP Address to an existing interface programmatically in C# without having to call powershell from C#, but I am going to post that as a separate question referring to this one. For this question I'm specifically going at it by trying to determine what New-NetIPAddress is calling.
Asked
Active
Viewed 398 times
0
-
4Try `(get-command new-netipaddress).Definition`, the cmdlet is a wrapper around CIM I believe – Santiago Squarzon May 16 '22 at 21:20
-
2To add to Santiago's comment: specifically, these cmdlets are implemented in [CDXML](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/wmi_v2/cdxml-overview). – mklement0 May 17 '22 at 14:13