Chapter 29. Remoting

Introduction

PowerShell’s support for local and interactive computer automation makes it an incredibly attractive platform for computer management and administration. Its rich, object-flavored perspective takes even the simplest of management tasks to the next level.

In version one, local administration was essentially the limit of where PowerShell applied its unique perspective. While it supported interaction with traditional remoting technologies (SSH, FTP, Telnet, PsExec, and more), its support was no different than that offered by any other shell.

In version two, the PowerShell and Windows Remote Management (WinRM) teams worked together closely to create a combined release known as the Windows Management Framework. Designing a rich remoting experience was one of the top focuses of their collaboration. Starting with standard interactive remoting, PowerShell lets you easily connect to a remote system and work with it one to one.

If you want to import the commands from that remote system (but still have them run on the remote system), implicit remoting often lets you forget you are managing a remote system altogether. Expanding on interactive and implicit remoting, large-scale fan-out remoting is a natural next step. Fan-out remoting let you manage many computers at a time in a bulk, command-based approach.

PS > Invoke-Command Lee-Desk { Get-Process -n PowerShell } -Cred Lee Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id Process PSComputer Name Name ------- ------ ----- ...

Get Windows PowerShell Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.