Skip navigation

Common Ways to Run Programs on Remote Computers

In a Windows environment, there's more than one way to run a program on a remote computer. Here are some commonly used techniques and their main advantages and disadvantages:

PsExec is a powerful utility that provides a number of useful features. However, it has one big disadvantage: If you need to run a program on another computer using alternate credentials, PsExec sends the password in clear text over the network.

PowerShell remoting offers interactive sessions (Enter-PSSession), persistent connections to run multiple commands (New-PSSession), and the ability to run PowerShell commands and scripts on remote computers. The main disadvantages are that the remote machines must have at least PowerShell 2.0 and you have to enable remoting (which is disabled by default).

You can use the Windows Management Instrumentation's (WMI's) Win32_Product class if you need to install a program on a remote system, but this technique is limited to installing Windows Installer (.msi) packages. The package must be copied to the remote system first. Msiexec.exe command-line parameters (such as /qn) aren't supported. Also, some OSs (notably Windows Server 2003) don't have the WMI Windows Installer provider installed by default. Most administrators give up trying to install packages remotely using Win32_Product due to the complexities.

The Windows Task Scheduler service is a native part of the OS and provides a secure means for executing programs on remote computers. The main disadvantage to using the Task Scheduler service to run programs is finding an easy way to automate the interaction with the Task Scheduler service to run a program. This is the problem that Start-Program.ps1 solves.

You can learn all about the Start-Program.ps1 PowerShell script in the article "Run Programs on Remote Computers On Demand with One Command."

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish