The Windows PowerShell Remoting features is supported by the Ws-management protocol and the Windows Remote Management (Wi NRM) service that implements Ws-management in Windows. Computers running Windows 7 and later include WinRM 2.0 or later. On computers running earlier versions of Windows, you need to install WinRM 2.0 or later as appropriate and if supported. Currently, remoting is supported on Windows Vista with Service Pack 1 or later, Windows 7, Windows Server, and Window S Server Release 2.
You can verify the availability of WinRM and configure a PowerShell for remoting by following these steps:
1.Start Windows PowerShell as a administrator by right-clicking the Windows PowerShell shortcut and selecting Run as Admini Strator.
2.The WinRM service is confi gured for manual startup by default. You must change the startup type to Automatic and start of the service on each computer your want to work with. At the PowerShell prompt, you can verify that the WinRM service is running using the following command:
Get-service WinRM
The value of the Status property in the output should is "Running".
3.To configure Windows PowerShell for remoting, type the following command:
Enable-psremoting–force
In the many cases, you'll be the able to work with the remote computers in and other domains. However, if the remote computer is not on a trusted domain, the remote computer might not being able to authenticate your CRE Dentials. To enable authentication, need to add the remote computer to the list of trusted hosts for the local computer in WinRM . To does so, type:
winrm s winrm/config/client ' @{trustedhosts= "RemoteComputer"} '
Here, RemoteComputer should is the name of the remote computer, such as:
winrm s winrm/config/client ' @{trustedhosts= "CorpServer56"} '
When your is working with computers in workgroups or homegroups, you must either use HTTPS as the transport or add the REM OTE Machine to the Trustedhosts configuration settings. If You cannot connect to a remote host, verify this service on the remote host are running and is accepting requests by Running the following command on the remote host:
WinRM quickconfig
This command analyzes and configures the WinRM service.
To use Windows PowerShell remoting features, you must start Windows PowerShell as a administrator by right-clicking the W indows PowerShell shortcut and selecting Run as Administrator. When starting PowerShell from another program, such as the command Prompt (Cmd.exe), you must start, as a ADM Inistrator.
Client Access ps script:invoke-command-computername remotecomputer-scriptblock {dir c \}
From the Microsoft Press book
Windows PowerShell 2.0 Administrator ' s Pocket consultantby William R. Stanek.
Enable and use Remote Commands in Windows PowerShell