O'Reilly logo

Learn Windows PowerShell in a Month of Lunches by Don Jones

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 18. Sessions: remote control, with less work

Back in chapter 10, I 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. Each of those 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 of tackling remoting. You’ll also learn about a third way of using remoting that will really come in handy.

18.1. Making PowerShell ...

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