3 ms·
> "Someone had to write the Get-NetAdapter cmdlet" Amusingly no, nobody wrote it. There's a part of PowerShell which can wrap WMI/CIM classes into auto-generat
by jodrellblank 6y ago
> "Someone had to write the Get-NetAdapter cmdlet"
Amusingly no, nobody wrote it. There's a part of PowerShell which can wrap WMI/CIM classes into auto-generated cmdlets, and Get-NetAdapter is one of those. (Which is why it's not available on Linux installs of PowerShell).
Take a look at the XML in C:\Windows\System32\WindowsPowerShell\v1.0\Modules\NetAdapter\ and there's no C# code or .Net DLL for it, just "MSFT_NetAdapter.cmdletDefinition.cdxml" and "MSFT_NetAdapter.Format.ps1xml". Presumably auto-generated, human checked, though I can't prove that.
[1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/wmi_v2/cdxml-overview https://docs.microsoft.com/en-us/previous-versions/windows/d...