PS version on local machine vs PS version on remote machine

I was just watching the videos “Getting Started with PowerShell 3.0 Jump Start” from the MS Virtual Academy. Great stuff, there’s a ton of great information on these videos, would recommend it to everyone. But there was always one question stuck on my mind, that I think Jeffrey and Jason forgot to mention. The question is: What if the PS version on my local machine is greater then the PS version on the remote when I’m doing an Invoke-command to the remote machine?
Is there a best practice that all machines in an environment should run the same PS version? And if so, Is there a method (like a GPO or something) to enforces this?

WinRM works with all PSversion, well WMF2+

u don’t need to have the same WMF on every machine, but u will have to make script taking in considaration the lowest version.(it is allways better to have the same version everywere but not realy possible if u have a mixed infrastructure 2003srv,2012srv …)

For deployement the package is a msi or msu so easy to deploy with GPO
Check WSUS additionnal Package too.


But what if I’m testing a bunch of commands locally firs. Then executes these commands by invoke-command on machine A, B and C. Machine A and B have same PS version as my local machine, but C have an older version that doesn’t support all of my commands?

The remote machine simply has to have whatever commands you want it to run. If it doesn’t, then they can’t run.

But that’s not really a “PowerShell version” thing. Most commands aren’t tied to PowerShell, they’re tied to product, like Windows. Much of what you’re thinking of as “PowerShell commands” are add-ins, and can often be installed on different versions.

@ Don
I see your point. Thanks :slight_smile: