Error when adding SharePoint Powershell snapin

10,750

What is your SharePoint version, 2010 or 2013?
What is your Powershell version? ($PSVersionTable.PSVersion)

SharePoint 2010 expects PowerShell version 2, which you can get to by running powershell -version 2

enter image description here

NB. (To the commenter above)
If you dont have SharePoint installed on the PC you get this message.

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
Share:
10,750
user3753693
Author by

user3753693

Updated on June 04, 2022

Comments

  • user3753693
    user3753693 almost 2 years

    When I run Add-PSSnapin microsoft.sharepoint.powershell I get

    Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 3. At line:1 char:1 + Add-PSSnapin microsoft.sharepoint.powershell + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (microsoft.sharepoint.powershell:String) [Add-PSSnapin], PSArgumentException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

    I know this sounds dumb but I have searched Google for about 12 hours trying to just add this snapin. Im writting my first shell script and just need help getting off the start

  • user3753693
    user3753693 almost 10 years
    I was running powershell version 3 with sharepoint 2010. can i install sharepoint somehow on a cliet?
  • riv_rec
    riv_rec almost 10 years
    SharePoint 2010 is only compatible with PowerShell v2, which you can access and use as in the screen shot above. To use SharePoint 2010 and the powershell commands together you need to have SharePoint installed on that machine.
  • Traderhut Games
    Traderhut Games over 3 years
    PS > Add-PSSnapin Microsoft.SharePoint.PowerShell Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.PowerShell' is not installed on this computer. At line:1 char:1 + Add-PSSnapin Microsoft.SharePoint.PowerShell + ~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.SharePoint.PowerShell:String) [Add-PSSnapin], PSArgumentException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCom‌​mand PS> $PSVersionTable.PSVersion Major Minor Build Revision ----- ----- ----- -------- 5 1 18362 752