Saturday, 17 August 2013

Microsoft.SharePoint.PowerShell Snapin: Incorrect Windows PowerShell version 3.0. Window PowerShell version 2.0 is supported in current...

Microsoft.SharePoint.PowerShell Snapin: Incorrect Windows PowerShell
version 3.0. Window PowerShell version 2.0 is supported in current...

I have SharePoint 2010 on my machine, for development purposes, and I made
the mistake of upgrading to .Net 4.0 and PowerShell 3.0.
The work around, running powershell with the -version 2.0 or -v 2
switch/arguement doesn't completely work.
So, this question is how do I add the Microsoft.Sharepoint.PowerShell
snapin in Powershell, on a Machine that has the .Net 4.0 framework?
TRY 1:
PS> Add-PSSnapin Microsoft.Sharepoint.Powershell
The local farm is not accessible. Cmdlets with FeatureDependencyId are not
registered.
PS> Get-SPSite('http://myServerName/')
Get-SPSite : Microsoft SharePoint is not supported with version
4.0.30319.18052 of the Microsoft .Net Runtime.
OK, So I TRY 2:
PS> powershell.exe -version 2.0
PS> Add-PSSnapin Microsoft.Sharepoint.Powershell
Add-PSSnapin : Incorrect Windows PowerShell version 3.0. Windows
PowerShell version 2.0 is supported in the current console.
At line:1 char:13
+ Add-PSSnapin <<<< Microsoft.Sharepoint.PowerShell
+ CategoryInfo : InvalidArgument:
(Microsoft.Sharepoint.PowerShell:String) [Add-PSSnapin],
PSArgumentException
+ FullyQualifiedErrorId :
AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
I've also tried setting the target of the shortcut. And uninstalling the
windows update that ends in q
So, thats my error that I cannot find any information on: Incorrect
Windows PowerShell version 3.0. Windows PowerShell version 2.0 is
supported in the current console.
Any thoughts?

No comments:

Post a Comment