Today my powershell updated to version 3.0. This version is build against and uses .NET runtime 4.0. The Sharepoint 2010 cmdlets require .NET 3.5 and don't work under 4.0. Anyone has an idea how to get scripts work?
I receive this error: Remove-SPSite : Microsoft SharePoint is not supported with version 4.0.30319.296 of the Microsoft .Net Runtime.
To fix this issue, we have to set the execution policy, so that the PowerShell script runs on the particular machine. Here is how: Open PowerShell Console by selecting “Run as Administrator” and get the execution Policy with the command: Get-ExecutionPolicy to get the current policy applied, such as “Restricted”.
try to launch powershell with : powershell.exe -version 2.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With