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?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI 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?
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.