Geeks With Blogs

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe


Lance's TextBox » About Me » My Resume »Twitter

A lot of people have asked me to explain the differences in the PowerShell Server v2 product with the obvious alternative:  PowerShell v2 Remoting via WinRM.

PowerShell Server

The nutshell is that with the PowerShell Server, you are not limited to Windows machines and you don’t need WinRM or any other software other than the PowerShell Server itself and any old SSH client.  This means that the “client” machine, where the commands are being sent from, can be anything – a Linux machine, a handheld device in the field, your cell phone, a Windows machine, a php app – ANYTHING that can do SSH. The picture shown is the get-process command being sent to a Windows machine in my office from the free iSSH application on my iPhone.  If you’re not familiar with SSH ("Secure Shell"), it is the most commonly used protocol for remote connections between computers, and it is secure and flexible.

As an extended feature, PowerShell Server v2 also comes with a set of free sshrunspace cmdlets that can be used on the client side and are freely distributable. While any SSH client can connect and send commands to the PowerShell Server, these cmdlets bring another level of power to the user by enabling the receipt of actual PSObjects from the PowerShell Server through the SSH connection much like you’d have with WinRM remoting. These cmdlets are the New-SSHRunspace, Remove-SSHRunspace, and Invoke-SSHExpression cmdlets. The first two are used to create and remove SSH protected runspaces, and the latter is used to execute PowerShell commands over that connection and receive PSObjects back from the PowerShell Server.



PowerShell v2 Remoting + WinRM

 

With PowerShell v2 Remoting via WinRM, you are limited to Windows machines communicating over the web services stack.  I believe that MS chose WinRM for mostly political reasons - it is a very heavy protocol based on web services. I won’t get into this argument, but in short, there is a reason why people use SSH and have been using it for a long time. :)

Similarities

  1. Both allow execution of PowerShell cmdlets on a remote Windows machine.
  2. Both are encrypted and secure – PowerShell server operates over an SSH (Secure Shell) connection, and PowerShell 2.0 Remoting works over HTTPS.
  3. Both require PowerShell to be installed on the remote Windows machine.
  4. Both require security and authentication, but in different ways.  In both cases a security certificate is used to identify the server.  In the case of PowerShell server, connecting users securely authenticate using select Windows security groups defined on the server machine.  When using WinRM, by default the credentials are the currently logged in user, but these can also be changed to use a remote account.

Differences:

  1. As mentioned before, both require PowerShell on the remote machine, but each requires a different “server piece”:  PowerShell 2.0 Remoting requires WinRM on the remote machine, and PowerShell Server of course requires itself to be installed on the remote machine.
  2. The use of PowerShell 2.0 Remoting requires PowerShell and WinRM to be installed on the client machine (the machine where the commands are being sent from).  There is essentially no client-side software  requirement for using PowerShell Server since SSH clients exist virtually everywhere:  Windows, *nix, mobile devices, web applications, etc.   As long as it can establish an SSH connection, a client machine can connect and cmdlets can be executed.  So you can be sitting on the beach (you know we all work even when we are on vacation), turn on your cell phone and login to an interactive remote PowerShell console over SSH and send all the commands you like.

 

 

 

Posted on Friday, January 9, 2009 3:16 PM Software , PowerShell | Back to top


Comments on this post: PowerShell Server v2 vs PowerShell v2 Remoting via WinRM

# re: PowerShell Server v2 vs PowerShell v2 Remoting via WinRM
Requesting Gravatar...
I have used both of these and am able to crash the remote server almost consistantly through scripts. Interactively they seem to both be solid the main differance is the flexibility SSH provides. with WinRM you need it installed on the client and server side as winrs is included in the install. with SSH you you dont need ssh or powershelll on client side which mean you can execute powershell commands when connected from terminal on nix machine.
Left by Paul Cassidy on Jan 24, 2009 6:38 PM

# re: PowerShell Server v2 vs PowerShell v2 Remoting via WinRM
Requesting Gravatar...
What is not clear; does one need to purchase PowerShell Server for Windows?
Left by Sale on Nov 18, 2009 10:36 PM

# re: PowerShell Server v2 vs PowerShell v2 Remoting via WinRM
Requesting Gravatar...
Yes, it is a commercial product, available here:
http://www.nsoftware.com/powershell/server/default.aspx
Left by Lance on Nov 19, 2009 1:55 AM

# re: PowerShell Server v2 vs PowerShell v2 Remoting via WinRM
Requesting Gravatar...
I'm using this: http://winrmapp.com it has some nice features besides powershell client
Left by Pete on Mar 02, 2015 3:30 PM

Your comment:
 (will show your gravatar)


Copyright © Lance Robinson | Powered by: GeeksWithBlogs.net