How to Run PowerShell Commands on Remote Computers
Powershell Remoting can allow you to run individual commands or run full Powershell sessions on remote systems. Unfortunately by default it is locked down, so before you try to use it you need to enable it. Within a domain this is an easy process.
- On the computer you wish to remote to open up a Powershell command as Administrator.
- Run the following cmdlet:
Enable-PSRemoting -Force
This command will start the WinRM service and sets it to automatic, it also creates a firewall rule within the built in Windows firewall that allow incoming connections. The force part of the command tells Powershell to run these actions without prompting you for each step.