O'Reilly logo

Windows PowerShell Cookbook, 2nd Edition by Lee Holmes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ------- ------ ----- ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required