i got below commands
gwmi win32_networkadapter -Filter ‘netconnectionid = “pwc lan port1”’ | select speed
but im not sure how to get duplex ,speed, ip address , these 3 values
I want to try to get these values for multiple servers at a time with the powershell
But IP address is not a property of the NetworkAdapter. It is a property of the NetworkAdapterConfiguration; look up the Win32_NetworkAdapterConfiguration class. That’s because a given adapter can have multiple configurations, each with one or more IP addresses. That is how WMI has always worked; it isn’t related to VBS or PowerShell.
[quote=11484]That’s because a given adapter can have multiple configurations, each with one or more IP addresses. That is how WMI has always worked; it isn’t related to VBS or PowerShell.
[/quote]
That’s a good point, and I didn’t account for that in my sample code. Here’s a version that’s probably going to work better if there are multiple configuration instances for the adapter: