PowerGUI Error: Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime

PowerGUI is my favorite IDE for creating PowerShell scripts. When I upgraded PowerGUI to a newer version 3.5, all my scripts stopped working and I started receiving below error:

“Get-SPWeb : Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime.”
PowerGUI Error: Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime
Root Cause:
SharePoint cmdlets do not work with .NET framework 4! In PowerGUI’s configuration, We got to remove that!

Solution:
Open the “ScriptEditor.exe.config” file from the location where PowerShell GUI is installed. Typically, “C:\Program Files (x86)\PowerGUI\”.

Find the Line: ” <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″ /> ” under “startup” node SharePoint PowerGUI Get-SPWeb Error
Comment that line, Save & Close.
PowerGUI .Net framework upgrade issue
Now, Restart the Script Editor. All should be working now.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *