by ps_beginner at 2013-01-14 23:08:21
1) SharePoint 2010 PowerShell snap-in is not compatible with PowerShell version 3.0 as indicated in this link (http://connect.microsoft.com/PowerShell … point-2010).by DonJ at 2013-01-15 14:45:14
Comments made by johnlouros provide a workaround by using “powershell -version 2.0” to launch new PS session. Based on my own testing, it works fine in Windows server 2008 R2 but not in Windows 7. Please see the attachment for side-by-side screenshot comparision. Could someone explain why the difference?
2) Another question is how to change PS version to 2.0 within PS remoting session? The remote hosting machine for SharePoint 2010 is already upgraded to PS version 3.0. After Enter-PSSession connecting to SharePoint host, the PS version for the remote session is 3.0. If using “powershell -version 2.0” command, the console is just hanging there. I have to use Ctrl+C to kill the newly launched session. Any suggestion?
Nope, can’t explain the difference. Sorry.by ps_beginner at 2013-01-16 22:31:23
You can’t change to v2.0 once you’ve initiated a session. The session configuration determines what version of PowerShell is used. If you want to remote to a v2 endpoint, you’ll have to manually create that session configuration yourself. “Secrets of PowerShell Remoting” (powershellbooks.com) covers creating custom sessions, although it does so for a different purpose it should still help you understand how to do so.
Hi Don,by DonJ at 2013-01-17 06:53:53
Thank you for replying my questions.
Last time I uploaded the screenshot image but I couldn’t find where it is. Now that I figure out how to use Img tag to add the screenshot on the page. It’s much easier to make my first question clear. It seems PowerShell behaves differently under Windows Server 2008 R2 (left) vs Windows 7 (right).
Consider logging that as a bug on connect.microsoft.com under the PowerShell program.