In this recipe, we will use PowerShell remoting to execute commands on a remote machine.
To work with remoting in PowerShell, we first need to identify which remote machine we want to use. In this recipe, we will assume that there are two machines in the same domain that we can use.
Log in to the machine you want to use for remoting. We will refer to this as
<Remote Machine Name>. PowerShell remoting needs to be enabled on this machine.
Check out the system and permission requirements for running PowerShell remoting from MSDN about_Remote_Requirements (http://msdn.microsoft.com/en-us/library/hh847859.aspx).
To turn on remoting, open the PowerShell console in
<Remote Machine Name> using elevated privileges. ...