I have the following line of code to create an object to access a remote server before I associate it with a username, password, and process:
$process = [WMIClass]"\\remoteServer\ROOT\cimv2:Win32_Process"
I tried this on two computers, one of them without errors, but the other that I run has an exception:
Cannot convert value "\\remoteServer\ROOT\cimv2:Win32_Process" to type "System.Manage ment.ManagementClass". Error: "Access is denied. (Exception from HRESULT: 0x800 70005 (E_ACCESSDENIED))"
The remote server is the same. Not sure what I need to install on a local PC or a remote PC to make this work? On both client computers, user names are members of Administrators.
source share