Good day all,
I am trying to get some information from remote machines. I have searched and found where I can substitute the host name for the “.” In the below script
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem", , 48)
For Each objItem In colItems
Debug.Print "Manufacturer: " & objItem.Manufacturer
Next
I have tried the hostname and ip with no result. ObjWMIService and colItems are both blank in when I step through in debug. I am able to ping the hostname and ip without any problems.
How can I get the information from a remote machine?
Thanks for you time,
Shane
I am trying to get some information from remote machines. I have searched and found where I can substitute the host name for the “.” In the below script
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem", , 48)
For Each objItem In colItems
Debug.Print "Manufacturer: " & objItem.Manufacturer
Next
I have tried the hostname and ip with no result. ObjWMIService and colItems are both blank in when I step through in debug. I am able to ping the hostname and ip without any problems.
How can I get the information from a remote machine?
Thanks for you time,
Shane