By using Process.GetProcesses
, we can list running processes in a remote computer, e.g.
Process [] allRemoteProcesses = Process.GetProcesses("myRemoteComputer");
However, this seems to depend on the permission of my account. It throws exception "Couldn't connect to remote machine." if the running user does not have access to the remote machine. Can I specify another account to be used by .NET when checking the processes, similar to the -u
and -p
switches in PsList?