When I tried to run a script that would open a web application in SharePoint it was throwing an error as Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime
To continue use this editor to work with SharePoint 2010 2.0 cmdlets, the only way I found was to change a config file. Please follow the steps below:
- Goto: C:\Program Files (x86)\PowerGUI\
- Make a backup copy of this file “ScriptEditor.exe.config” and open the original file in an editor and change the configuration section to look like below.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v2.0.50727" /> </startup>