1

EDIT: I wrote this question in a misleading way. I should clarify that while I am on SharePoint Server 2010, I have admin rights on a SharePoint site. I do not have Foundation or Server apps.

I was having a similar problem as the link below, except I am using Windows PowerShell to install the Microsoft.SharePoint.Powershell.dll file. When I attempted the fix, I got this message in PowerShell:

"System.IO.FileNotFoundException: 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."

How else can I get Microsoft.SharePoint.PowerShell.dll?

'The Windows PowerShell snap-in'Microsoft.SharePoint.PowerShell is not installed on this machine' on SP Server

  • Are you on a SharePoint Server? Can you explain if this is a new installation, what version, what service pack, etc. – Mike Jul 21 '14 at 18:23
  • I am on SharePoint Server 2010. This is not a new installation. I am unsure of the version. No additional service packs installed as far as I know. – Chris Jul 21 '14 at 18:43
  • And when does this error pop up? Can you explain the recreation steps? Do you have administrator rights to the server? – Mike Jul 21 '14 at 19:30
  • I have admin rights to the server. To try to install the .dll file I need, I used Windows PowerShell and type "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", then I receive the error. – Chris Jul 21 '14 at 20:16
  • 1
    xkcd.com/979 – Paul Strupeikis Apr 20 '16 at 14:58
1

For sharepoint 2010, you have to run the command which compatibale for .net 3.5,try this

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

the command you mentioned is for .net 4.0 but in 2010 mostly we are on .net 3.5.

| improve this answer | |
  • I just tried it, and I'm getting the same error I described. Except the directory path is "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\v4.0_15.0.0.0_71e9bce111e9429c\Microsoft.SharePoint.PowerShell.dll". Maybe I didn't install something, so that's why I don't have the .dll? – Chris Jul 21 '14 at 20:50
1

What are you ultimately trying to do? Load the powershell snapin? Use Add-PSSnapin Microsoft.SharePoint.Powershell in the powershell console to load it. Installing SharePoint should automatically put the dll where it needs to.

| improve this answer | |
  • That is precisely what I am trying to do. The problem is the dll isn't on my computer. I only installed SharePoint designer and have access to a SharePoint server (not the software). It seems that I need to install the SP Server Application. – Chris Jul 22 '14 at 15:43
  • You need to be on the SharePoint server in order for this to work. Otherwise, if you want to do remote powershell sessions, you can do a command, you need to look into PSRemote: howtogeek.com/117192/… – Mike Jul 22 '14 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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