3

I am using Windows Server 2008 R2 with SharePoint 2010.

I see two PowerShell tools on this machine: Windows PowerShell and the SharePoint 2010 Management Shell.

Does anyone know the difference? Can I use both for deployments of wsp files?

1

1 Answer 1

2

The SharePoint 2010 Management Shell is an instance of PowerShell that already has the SharePoint PSSnapIn loaded. You can use either to deploy SharePoint .wsp solution packages.

Prefacing your script with:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

will ensure that it will run from either shell instance.

1
  • there is also windows powershell modules. I have test some deployment commando's and it works. why there are many types powershells?
    – Ola
    Feb 21, 2013 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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