I work with Sharepoint and I need Sharepoint snap-in present in my console host. When I run powershell from my Windows start menu, I run command
Add-PSSnapin Microsoft.Sharepoint.Powershell
snap-in is added ok, and everything works well.
Also, everything is ok, when I run cmd.exe, and type powershell.exe
to it and press enter. So I think no shortcut parameters are involved in this problem (but I not 100% sure :) ).
But when I launch powershell through some launcher (I've tested Launchy and Enso) and I try to add the same snap-in, it fails with this error message:
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
At somefile.ps1:7 char:14
+ Add-PSSnapin <<<< Microsoft.Sharepoint.Powershell
+ CategoryInfo : InvalidArgument:(Microsoft.Sharepoint.Powershell:String)
[Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId :
AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
What is the difference when I launch powershell with launcher?
I think this is not sharepoint related problem but rather powershell one.
(note: I know about Sharepoint management shell and question is not about it)
powershell
- Windows Powershell and Windows Powershell (x86). But powershell is started as 32 bit no matter what version I am trying to run. (Enso is 32bit I guess.) Is this normal behavior? Is there some way to launch 64 bit powershell from 32 bit launcher? – Tight