Unfortunately, the Start-Process cmdlet has no -ComputerName parameter so you cannot use it to launch processes remotely on other machines on your network.

Use WMI instead! This line will run mspaint.exe on your local machine:

PS> (Invoke-WmiMethod Win32_Process Create mspaint.exe).ReturnValue -eq 0

True

And this slight adaption will run mspaint.exe on a computer named “PC1″ with Administrator credentials (adjust machine name and user name to your needs):

PS> (Invoke-WmiMethod Win32_Process Create mspaint.exe -ComputerName PC1 -Credential Administrator).ReturnValue -eq 0   

True

Note that mspaint.exe will run but is not visible to anyone. In real life you’d use this technique to launch command line tools or applications that are designed to run unattended.

facebooktwittergoogle_plusredditpinterestlinkedinmail