Saturday, March 5, 2016

Powershell get network information

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer)
Set colItems = objWMIService.InstancesOf("Win32_NetworkAdapter")
For Each objItem in colItems
Wscript.Echo objItem.Description
Wscript.Echo objItem.NetConnectionStatus
Next

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...