Use PowerShell Invoke-Command for Remoting

1:Get-Service  winrm | fl  (To ensure this service is running as below)

Use PowerShell Invoke-Command for Remoting_第1张图片


we can user group policy to batch enable this service

Use PowerShell Invoke-Command for Remoting_第2张图片


2:Allow the service through Windows Firewall

Use PowerShell Invoke-Command for Remoting_第3张图片


3:Allow remote server management through WinRM

Use PowerShell Invoke-Command for Remoting_第4张图片Use PowerShell Invoke-Command for Remoting_第5张图片


4:now we can Invoke command from remote server  as below

Use PowerShell Invoke-Command for Remoting_第6张图片


Reference article as below

http://www.public.madeinengland.co.nz/how-to-remotely-add-features-to-many-windows-2008-r2-servers-using-powershell/

https://blogs.technet.microsoft.com/heyscriptingguy/2011/06/13/use-powershell-invoke-command-for-remoting/


one of the most important things is to read about_concept.

1: update-help

2: help about_concept

Use PowerShell Invoke-Command for Remoting_第7张图片

Have a nice day!

你可能感兴趣的:(powershell)