Monday, October 13, 2014

WSP Add/Install/Update/Uninstall ect. Using Power Shell commands

we can get help from using power shell help command for writing power shell commands

get-help CommandName -example

Ex: get-help Add-SPSolution -example

Add Solution:
Add-SPSolution -LiteralPath c:\wspfileName.wsp

Install Solution:
Install-SPSolution -Identity wspfileName.wsp -GACDeployment 
(or)
Install-SPSolution -Identity wspfileName.wsp –WebApplication siteUrl  –GACDeployment 
Enable Feature:
Enable-SPFeature -identity "FeatureName" -URL siteUrl

Update Solution:
Update-SPSolution -Identity wspfileName.wsp -LiteralPath c:\wspfileName.wsp -GACDeployment

Uninstall Solution
Uninstall-SPSolution -Identity wspfileName.wsp

Remove Solution
Remove-SPSolution -Identity wspfileName.wsp

Disable Feature:
Disable-SPFeature -identity "FeatureName" -URL siteUrl

SiteBackUp:
Backup-SPSite siteUrl -Path C:\BackupFileName.bak

SiteRestore:
Restore-SPSite siteUrl -Path C:\BackupFileName.bak -force 

Ex: siteUrl= http://SP2013/sites/SiteName/

No comments:

Post a Comment