Subscribe to Windows IT Pro
January 30, 2012 03:18 PM

Common Ways to Run Programs on Remote Computers

Windows IT Pro
InstantDoc ID #141558
Rating: (0)

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."

Related Content:

ARTICLE TOOLS

Comments
  • murat yildirimoglu
    4 months ago
    Jan 21, 2012

    Good article Bill. I must add two alternatives for remote execution: 1) Telnet 2) Windows Remote Shell (Winrs). Telnet (telnet server) service exist in XP but it is disabled by default. After enabling this service we can remotely connect to to XPs and execute commands on those computers. On Vista and 7 Telnet Server and Client components can be installed from the Add/Remove Windows Components section. Telnet uses port 23 by default. Winrs on the other hand exists only on vista and 7. When configured, commands can be executed on remote computers over port 80.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.