Error: The Windows PowerShell snap-in ‘Microsoft.SharePoint.Powershell’ is not install

Posted: January 27, 2011 in PowerShell
Tags: , ,

Error message:

Cannot load Windows PowerShell snap-in Microsoft.Sharepoint.PowerShell because of the following error: The Windows PowerShell snap-in  Microsoft.SharePoint.PowerShell is not installed on this machine.

PS C:\Users\pohorelskyr\Desktop> Add-PSSnapin Microsoft.SharePoint.Powershell
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.Powershell' is not installed on this machine.
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

Solution:
Use InstallUtil located in C:\Windows\Microsoft.NET\Framework64\v2.0.50727 or v4.0.30319 and install library Microsoft.SharePoint.PowerShell.dll located in GAC.

Run..

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil /LogToConsole=true C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll
About these ads
Comments
  1. Daniel says:

    Hi

    Good post but won’t currently work with SharePoint 2010 (until MS release support for .NET 4.0). This is because we’re stuck with .NET 3.5 ;-(
    So I changed the reference to InstallUtil

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil /LogToConsole=true C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll

    btw: love the worpress templates I am strugging trying to do something equally impressive with Joomla.

  2. Mysonemo says:

    Hi,

    For SharePoint2013:

    PS C:\Windows\system32> C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil /LogToConsole=true C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll

    Bye

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s