It seems that SharePoint 2010 is still incompatible with PowerShell version 3.0.
I am already aware that it is possible to force compatibility by executing PowerShell with the -v 2
switch, but is there a way to force this compatibility mode when using a remote session via PSSession as using a remote desktop is quite impractical just to launch a shell?
If you start the client PowerShell with-v 2
. Then outgoing remote sessions should use v2 on the remote end automatically.Update: it appears I am mistaken - I think in fact I had discussed this with the PowerShell team, but apparently it's not fixed. Anyway, you can create a session configuration on the server that is forced to version 2.0:
Accept all of the prompts. Now, you must pass the name of the new remote session configuration when invoking from the client side (in this example, the client and server are the same machine: my desktop)
As you can see, the remote endpoint is running 2.0.
I hope this helps.