Wednesday, October 17, 2007

VBScript - List network adapters including wireless adapters

This script will display all the network adapters including wireless adapters in your workstation.

'Script Start

'Call WMI service win32_networkadapter
strComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery ("Select * from in32_NetworkAdapter",,48)

'Display all objects.
For Each objItem in colItems

WScript.Echo "Name: " & objItem.Name
WScript.Echo "Availability: " & objItem.Availability

Next
WScript.Quit
'Script End

No comments: