How to add Sharepoint Powershell to Console2

Posted by BGM on Super User See other posts from Super User or by BGM
Published on 2012-08-06T15:03:22Z Indexed on 2012/12/18 17:05 UTC
Read the original article Hit count: 289

Filed under:
|
|

Salvete! I want to add the Powershell Console for Sharepoint to the tablist in Console2.

I already have plain Powershell, but I want the Sharepoint Powershell snapin added automatically.

If I look at the properties of the Sharepoint Powershell Console shortcut, I see this:

C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

but that doesn't work in Console2, so I tried this, which doesn't work either:

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\psconsole.psc1"  -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

Whenever I try, it will load Powershell, but not the Sharepoint Console. I get this:

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\CONFIG\POWERSHELL\Registration\SharePoint.ps1:3 char:13
+ Add-PsSnapin <<<<  Microsoft.SharePoint.PowerShell
+ CategoryInfo          : InvalidArgument: (Microsoft.SharePoint.PowerShell:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

I tried this out, too.

Anybody know?

© Super User or respective owner

Related posts about console

Related posts about sharepoint-2010