Command for WSP Deployment Using Power Shell in SharePoint 2010 Server
1.Develop Custom Webpart
Open PowerShell and Run as Administrator
C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
Adding
————
write-host “Adding Snapin”
Add-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Added”
————
write-host “Adding Snapin”
Add-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Added”
Add-SPSolution “D:\MySPSolution.wsp“
Install-SPSolution –Identity MySPSolution.wsp –WebApplication http://EXCH2010:9006 –GACDeployment
Install-SPSolution –Identity MySPSolution.wsp –WebApplication http://EXCH2010:9006 –GACDeployment
Update wsp
————-
————-
Update-SPSolution –Identity MySPSolution.wsp –LiteralPath “D:\MySPSolution.wsp” –GacDeployment
unInstall wsp
————-
————-
Uninstall-SPSolution –Identity MySPSolution.wsp –WebApplication http://EXCH2010
Remove-SPSolution–Identity MySPSolution.wsp
Remove-SPSolution–Identity MySPSolution.wsp
Or below
Uninstall-SPSolution -identity MySPSolution.wsp -Confirm:$false
Remove-SPSolution -identity MySPSolution.wsp -Confirm:$false
Remove-SPSolution -identity MySPSolution.wsp -Confirm:$false
===========================================================================================================
Specific to One site
=========================================================================================================
————–
write-host “Adding Snapin”
Add-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Added”
=========================================================================================================
————–
write-host “Adding Snapin”
Add-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Added”
Adding
—–
Add-SPSolution “C:\CustomWebPartTest.wsp”
Install-SPSolution –Identity CustomWebPartTest.wsp –WebApplication http://EXCH2010:9006 –GACDeployment
—–
Add-SPSolution “C:\CustomWebPartTest.wsp”
Install-SPSolution –Identity CustomWebPartTest.wsp –WebApplication http://EXCH2010:9006 –GACDeployment
Update wsp
————-
————-
Update-SPSolution –Identity MySPSolution.wsp –LiteralPath “D:\MySPSolution.wsp” –GacDeployment
Uninstall
————–
————–
Uninstall-SPSolution –Identity CustomWebPartTest.wsp –WebApplication http://EXCH2010:9006 -Confirm:$false
Remove-SPSolution -identity CustomWebPartTest.wsp -Confirm:$false
Remove-SPSolution -identity CustomWebPartTest.wsp -Confirm:$false
write-host “Removing Snapin”
Remove-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Removed
Remove-PsSnapin Microsoft.SharePoint.PowerShell
write-host “Removed
No comments:
Post a Comment