In 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:
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"
To list the PowerShell configurations and associated settings, I recommend using the following command:PS:> Get-PSSessionConfiguration
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!