Run remote Powershell session as version 2

Question:

I’m on a server that is running Powershell Version 2:

I then create a new remote session to a different computer and connect to it:

It returns me the result:

However, I need Powershell to be in Version 2 for my script so I enter a session (to make it easier). I then try to get Powershell to be Version 2:

And then it just hangs (or at least never lets me enter anything else into the console until I Ctrl-C).

I’ve also tried going through the Invoke-Command:

and it does the same.

I’ve also tried to register a PSSessionConfiguration as per here: https://technet.microsoft.com/en-us/library/hh847899.aspx

But I get:

Does anyone have any ideas of what I can try next?!
Thanks

Answer:

On what machine did you run Register-PSSessionConfiguration?. Your computer or the “server”?

You need to make the configuration on the target server. That is what you will be running the hosted PSSessionConfiguration.

I just tried the steps in the technet article and it worked perfectly. My 2008 server remoted to my windows 7 machine running a 2.0 PSSessionConfiguration.

On target server/host:

Then, on the client machine, reference the ‘PS2’ configuration.

Source:

Run remote Powershell session as version 2 by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply