Chapter 20. Sessions: remote control with less work

In chapter 13, we introduced you to PowerShell’s remoting features. In that chapter, you used two primary cmdlets—Invoke-Command and Enter-PSSession—to access both one-to-many and one-to-one remote control. Those two cmdlets worked by creating a new remoting connection, doing whatever work you specified, and then closing that connection.

There’s nothing wrong with that approach, but it can be tiring to have to continually specify computer names, credentials, alternative port numbers, and so on. In this chapter, we’ll look at an easier, more reusable way to tackle remoting. You’ll also learn about a third way to use remoting that’ll also come in handy.

20.1. Making PowerShell remoting a bit ...

Get Learn Windows PowerShell 3 in a Month of Lunches, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.