Normalerweise funktioniert PowerGui ohne Probleme mit SharePoint, letztens gab es jedoch auf einen Testsystem folgende Fehlermeldung:

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

Isaac schreibt hierzu in seinem Blog des es wohl mit einem PowerGui Update die native .Net Framework 4.0 Unterstützung gibt und dadurch der Fehler auftritt.

Ich bin mal so frei und zitiere aus seinem Post:

The below only works with x64. I’m sure there is a smiler config setting in the x86 ScriptEditor but I do not cover it below.

  1. Goto: C:Program Files (x86)PowerGUI
  2. Make a backup copy of this file “ScriptEditor.exe.config” then open in your favorite xml editor.
  3. Make the below edit to your xml file, on line 4.

Before

<?xml version=”1.0″ encoding=”utf-8″ ?>
< configuration>
< startup useLegacyV2RuntimeActivationPolicy=”true”>
<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″ />
< supportedRuntime version=”v2.0.50727″ />
< /startup>

After

<?xml version=”1.0″ encoding=”utf-8″ ?>
< configuration>
< startup useLegacyV2RuntimeActivationPolicy=”true”>
< !–<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″ />–>
<supportedRuntime version=”v2.0.50727″ />
< /startup>

** Update 03/02/12 ** I think there is just some conflict with Visual Studio 2010 components that are installed .net 4 & etc.. and this PowerGUI version. Or maybe that its an upgrade. Who knows.. I did however install PowerGUI on another machine today, and it worked fine with the SharePoint 2010 cmdlets.