wmi Network StatusInfo and Status Null why?

  • Thread starter Thread starter rogoflap
  • Start date Start date
R

rogoflap

I need to get this information from every machine on our network, but
it is always returning Null from every machine.

Why is this?

Is there a way to correct it?


Code Sample used:

For Each strComputer In RemotePC

'Set objWMIService = GetObject("winmgmts:Computer_B\root\cimv2)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\cimv2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_NetworkAdapter",,48)
For Each objItem in colItems
sTemp = "-----------------------------------"
sTemp = sTemp & vbCrLf & "Win32_NetworkAdapter instance"
sTemp = sTemp & "-----------------------------------" & vbCrLf
sTemp = sTemp & vbCrLf & "Status: " objitem.status & " " &
objitem.statusinfo
Wscript.Echo sTemp
If IsNull (objItem.Status) Then
WScript.Echo "Null Status"
Else
WScript.Echo objItem.Status
End if
Next
Next




Thanks,

Rogoflap
 
Back
Top