egbea
13 years agoOccasional Contributor
WMI-WbemScripting.SwbemLocator problem
Hello everyone.
I am writing script that will monitor remote machine (Server) memory usage from my local PC.
However, the following line of code is giving me nightmares in that, it will return null object.
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
I have enabled enabled WMI service. I have also allow Security for Root\CIMV2 by enabling Remote permission in
both my local machine and remote server and it still not creating object.
I will appreciate any advice and suggestion to overcome this problem. Without creating object, I cannot move forward
to connect to the remote server as shown.
Set objWMIService = objSWbemLocator.ConnectServer(Computer, _
"root\CIMV2", _
Login, _
Password, _
"MS_409", _
"NTLMDomain:" + strDomain)
I will like to add that my Client PC is Windows 7 and Remote Machine is Windows 2008r2 Server.
Thank you,
Egbe.
I am writing script that will monitor remote machine (Server) memory usage from my local PC.
However, the following line of code is giving me nightmares in that, it will return null object.
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
I have enabled enabled WMI service. I have also allow Security for Root\CIMV2 by enabling Remote permission in
both my local machine and remote server and it still not creating object.
I will appreciate any advice and suggestion to overcome this problem. Without creating object, I cannot move forward
to connect to the remote server as shown.
Set objWMIService = objSWbemLocator.ConnectServer(Computer, _
"root\CIMV2", _
Login, _
Password, _
"MS_409", _
"NTLMDomain:" + strDomain)
I will like to add that my Client PC is Windows 7 and Remote Machine is Windows 2008r2 Server.
Thank you,
Egbe.