|
Guy recommends : View the effective permissions for a folder or shared drive. Free download try it now! |
How to Setup PowerShell RemoteHow to Setup Windows PowerShell Remote v 2.0The ability to create a remote connection is the most important difference between PowerShell v 1.0 and 2.0. However, setting up remoting for the first time, is one of the most difficult tasks in PowerShell, especially in non-domain environments. But no worries, I will lead through the steps and anticipate some of the potential problems with WinRm and TrustedHosts. PowerShell Remoting Tutorial Topics
♣ Introduction to Windows PowerShell RemotePowerShell 1.0 is easier to learn than v 2.0, largely because there are few cmdlets and certainly no ability to create a remote session. However, for those who mastered the basics of v 1.0, this inability to run scripts against another machine soon becomes a severe limitation. Furthermore, once you have a working knowledge of PowerShell, then setting up remoting is not so hard after all. It's almost as though PowerShell 2.0 has this built in hurdle, you won't be able to use remoting until your good enough to find, and then control, the TrustedHosts configuration. In many ways my remote PowerShell tutorial reminds me of learning Telnet. Sitting at our own keyboard, yet running the wonderful PowerShell commands against another machine transforms what we can achieve in terms of configuring settings and collecting data about your network empire. Our Mission - To Enable Remoting in PowerShell v 2.0The crucial component for this mission to get remote PowerShell working is WinRm. If you have used a command line program such as NetSh then the techniques for configuring WinRm will be vaguely familiar. I have divided this Remote PowerShell tutorial into four sections, this breakdown is particularly handy for troubleshooting.
Goal - To Install the WinRm Service The problem in explaining how to install WinRm is that each operating system has a different requirement. Windows 7 and Server 2008 R2 already have WinRm, so there is no need worry about installing this service. However, for Vista, XP and Windows Server 2008 you need to download the files from Microsoft and install WinRm. Any doubts on what your machine already has installed either check the Services mmc, or better still use PowerShell and try: Get-Service winrm. Goal - To Enable PowerShell Remoting Launch PowerShell v 2.0 as an administrator then try this: Enable-PSRemoting Note that unlike PSSession commands, this function only has one 'S' - PSRemoting. Actually, the underling cmdlet is Enable-PSSessionConfiguration. Running Enable-PSRemoting cmdlet achieves the following: Starts the WinRM service and sets the startup type to Automatic. Enables a firewall exception for WS-Management communications. Creates a listener to accept requests on any IP address. Guy Recommends: A Free Trial of the Network Performance Monitor
(NPM)
|