GSX Blog

Allow Remote PowerShell on SharePoint 2010 and PowerShell v3

Posted by cyril leroy on Wed, Aug 21, 2013

sharepoint2010 powershellv3 cmdlets resized 600In this quick article, I will show you how to allow remote PowerShell on both SharePoint 2010 (based on the .NET Framework 2) and PowerShell v3. 

When you have installed the latest version of the Windows Management Framework (v3 is based on the .NET Framework 4) on your SharePoint servers, the following error messages will be displayed when you try to use SharePoint PowerShell Cmdlets:

  • “Microsoft SharePoint is not supported with version 4.0.30319 of the Microsoft .Net Runtime”

  •  “The local farm is not accessible. Cmdlets with feature dependency are not registered”

This issue can prevent your monitor from scanning the SharePoint environment. For example, if you try to conduct a scan to test the remote connectivity, the following error will appear:

remote powershellv3 sharepoint2010 resized 600

There are some workarounds that are available to avoid this issue:

  • You can modify the PowerShell Shortcut locally.
  • Or, it can be done remotely by using PowerShell Profiles.

To force the default PowerShell version onto remote sessions, use this PowerShell command on the SharePoint PS Prompt:

PS:> Set-PSSessionConfiguration -Name microsoft.powershell -PSVersion "2.0"

remote powershellv3 sharepoint2010 2 resized 600 

To list the PowerShell configurations and associated settings, I recommend using the following command:

PS:> Get-PSSessionConfiguration

 remote powershellv3 sharepoint2010 3 resized 600

I hope my short tutorial has helped ease the process of allowing remote PowerShell on your environments. 

Do you have other PowerShell difficulties? I recommend reading our White Paper "PowerShell for Dummies: How to Keep Track of Your Exchange Environment" for more help. 

If you followed my instructions from this tutorial, please let me know how it went. If you have any questions, just leave me a comment and I'll get back to you!

Find out why more than 6 million mailboxes are monitored by GSX Solutions!

Tags: Microsoft, cmdlets, windows, Exchange, Powershell, sharepoint 2010, powershell v3