Join Jason C. Helmick for an in-depth discussion in this video Introducing PowerShell remoting, part of Up and Running with PowerShell 5.
- PowerShell is only part of the solution to scaleable management and the problems that we run into when trying to manage in larger and larger scale. PowerShell takes care of all of our automation for us, we've got commandments, we can even use other technologies such as reaching in to WMI. We can even reach all the way into the .net framework to build solutions to problems that we have. But one of the other issues that we face in management is being able to get to multiple machines fast.
And this has always been a challenge in Microsoft environments. Let me give you an example. I'm just going to open up Server Manager and I'm going to open up an old-fashioned tool, and, yes, it's an old-fashioned tool: Active Directory Users and Computers. This will let you connect to a computer. It will let you do something. Then you can connect to a different computer, of course, this takes you to your domain controller. It uses dcom and it uses RPC, remote procedure calls. This is the old way of connecting to machines and it's been built in for a long time.
It creates an issue for us though. I'm going to go ahead and close this and show you, see, what happens is, is this is a very old protocol, very old way of doing things, and because of that there have been some security issues, it's slow and it does one thing at a time, it does it really well and then it moves on. So as this example here, where I'm going to have it go to four different machines and we're just going to grab the bit service. It's going to them one at a time.
Now, I know it looked like it happened very fast, of course, it's my virtualized environment, but it's going to them one at a time, it's very slow, and like I said, we've had security problems, and the hardest thing is, have you ever tried to do this across a firewall? Have you ever tried to use Active Directory Users and Computers across a firewall? You end up having to open up a lot of ports, as a matter of fact, way more than what you want to open on a firewall. So here's why when you are downloading PowerShell, it's not called PowerShell. PowerShell's part of the solution.
The other part is called remoting and this comes together as what we refer to as the Windows Management Framework. And that's why it has the Windows Management Framework V 5 name is because we have this thing called remoting. When we use PowerShell, we refer to it as PowerShell remoting but anything can use remoting. Let me give you an example. I don't know if you've had a chance to play with the new Server Manager in Server 2012 and above, but everything that it does, it does through PowerShell and PowerShell remoting.
Let me give you another example, you know how I referred to Active Directory Users Computers as kind of the old-fashioned tool? That's because you're being provided with a new one. Guess what it uses? Yup, it uses the much more secured, faster, and efficient protocols that are being used today for remoting. And while I didn't necessarily mean to open this up, as he's starting to launch, he'll even show you the PowerShell commands that he's executing when you're using him. But you can do things to multiple machines quickly. Even notice through this graphical, if you've used this before, when you want to add rolls and features, it comes up and it asks you, oh, it says no other servers in the pool, but you get asked what servers do you want to do this to.
You could do stuff to multiple boxes. It's a great thing, but we can use PowerShell that way and use PowerShell through remoting. Actually, it changes how you start to manage and because we hit the machines faster and more secured, all of the sudden you can do amazing management tasks. Everything from deployment to making fixes and making changes much easier. You can automate these processes. You don't need to have people running around the network and trying to reach and grab hold of servers and that's what I want to show you is why PowerShell remoting is going to change your life.
- Installing Windows Management Framework 5
- Running commands (cmdlets)
- Discovering commands
- Understanding cmdlet syntax
- Resolving terse commands
- Finding and using local modules
- Working with files, printers, CSVs, and XML in the pipeline
- Selecting, sorting, and filtering object data
- Creating scripts
- Automating tasks
- Using PowerShell remoting