15

I made a fresh SP 2013 installation on win 2008 R2 SP1. When access SP Mgmt Shell, I am getting the following error - "Add-PSSnapin : The Windows PowerShell snap-in'Microsoft.SharePoint.PowerShell' is not installed on this machine".

As far as SharePoint is concerned, site and central admin are working fine. How do I fix this issue ? Do I need to add thing to Path variable ?

2
  • 1
    If you run "Get-PSSnapin | select name" is the SharePoint module listed? If it is, can you open an elevated PowerShell, and run "add-PSSnapin microsoft.sharepoint.powershell" does it load without the error? Nov 14, 2013 at 14:26
  • 1
    Hi Jesus, It is not listing SP. Just showing - Microsoft.Powershel.Core Nov 15, 2013 at 11:49

1 Answer 1

7

Try to run this in a powershell window to install the .dll, seems something has messed up your installation:

 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

(just copy paste the whole thing in to the window and click Enter)

Source (comment for 2013)

3
  • 1
    (Just copy paste the whole thing and click enter) haha not usually a good idea Oct 28, 2016 at 2:36
  • 4
    This doesn't work for me as that file doesn't exist in the pointed path.
    – Nae
    Oct 16, 2018 at 8:10
  • I'm follow your command but doesn't work for me and here are error message Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\v4.0_15.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll ' or one of its dependencies. The system cannot find the file specified.. Please help Jomchai Jun 27, 2019 at 8:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.