C
Christopher Attard
Hi,
I have this moniker string:
GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & strComputer &"\root\cimv2:Win32_Processor='" & strCPU & "'")
and I want to adapt it so that I can connect to a remote host using alternative credentials (i.e., using ConnectServer( ) ).
I'm trying this:
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, "root\cimv2:Win32_Processor='" & strCPU & "'", strUsername, strPassword)
objWMIService.Security_.ImpersonationLevel = 3
but it seems not working. Any ideas why? How should the moniker string be written when using ConnectServer( ) ?
Thanks,
Chris Attard
I have this moniker string:
GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & strComputer &"\root\cimv2:Win32_Processor='" & strCPU & "'")
and I want to adapt it so that I can connect to a remote host using alternative credentials (i.e., using ConnectServer( ) ).
I'm trying this:
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, "root\cimv2:Win32_Processor='" & strCPU & "'", strUsername, strPassword)
objWMIService.Security_.ImpersonationLevel = 3
but it seems not working. Any ideas why? How should the moniker string be written when using ConnectServer( ) ?
Thanks,
Chris Attard