Home > Blog
Jul 23

Written by: Daniel Westlake
7/23/2010 2:02 PM 

After installing SharePoint 2010 I was unable to open the SharePoint 2010 Management Shell. As soon as PowerShell ran I got a nice error stating:

 
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.PowerShell'
 is not installed on this machine.
At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONF
IG\POWERSHELL\Registration\SharePoint.ps1:3 char:13
+ Add-PsSnapin <<<< Microsoft.SharePoint.PowerShell
    + CategoryInfo          : InvalidArgument: (Microsoft.SharePoint.PowerShel
   l:String) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad
   dPSSnapinCommand
 
I wasn't able to find a solution to the problem on the internet so I'm posing the fix to help save you the time of figuring it out. Here's how to fix this problem with the SharePoint 2010 Management Console:
  1. Open a command prompt with elevated permissions.
  2. Browse to C:\Windows\Microsoft.NET\Framework64\v2.0.50727
  3. Execute the InstallUtil.exe with the following command line parameters:
    1. InstallUtil /LogToConsole=true C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll
 
The cause of the problem is because your missing this registry key and the associated values: HKLM\Software\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.SharePoint.PowerShell. Repairing SharePoint didn't fix this problem, I had to figure it out.
 

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Search Blog

Minimize