wmi Network StatusInfo and Status Null why?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top