Wednesday, February 29, 2012

Quick Notes: SharePoint Solution Deployment Commands - PowerShell

------------Add Snippet-------------------------
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\SharePoint.ps1"
Add-PSSnapin Microsoft.SharePoint.PowerShell
------------Add Solution-------------------------
Add-SPSolution "E:\SPSolutions\SharePoint. Finance.wsp"
Install-SPSolution –Identity SharePoint.Finance.wsp –WebApplication " http://SPServer:1000/" –GACDeployment -force
------------Update  Solution-------------------------
Update-SPSolution –Identity SharePoint.Finance.wsp –LiteralPath "E:\SPSolutions\SharePoint. Finance.wsp" –GacDeployment
------------Add Feature------------------------
Install-SPFeature Feature1 -force
Enable-SPFeature –Identity Feature1 –url "http://SPServer:1000/sites/Finance/"
------------Remove Feature------------------------
Uninstall-SPFeature Feature1
Disable-SPFeature –Identity Feature1 –url "http://spserver:1000/sites/Finance/"   

Microsoft has provided a tool to design PowerShell commands for SharePoint
Check this...
http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html

1 comment:

  1. Thanks Amit..
    Really very helpful for new users

    Regards
    Vishal Wattamwar

    ReplyDelete