Tuesday, January 21, 2014

Some PowerShell cmdlets that help you manage features and solutions in a SharePoint 2013 farm

Programmer , administrator , architect you need at least these cmdlets to manage your solution and deployement

-- To check the deployment status and the last operation done
Get-SPSolution | Select Name, LastOperationResult, LastOperationEndTime, LastOperationDetails

Add-SPSolution -LiteralPath C:\MySolution.wsp

Install-SPSolution -Identity "MySolution.wsp" -webapplication "http://Siteurl" -GACDEployment 

Enable-SPFeature  -Identity MySolution_Feature1 -url "http://Siteurl "

Update-SPSolution  –Identity MySolution.wsp –LiteralPath “C:\MySolution.wsp” –GacDeployment

-- Disable Feature from Web Application
Disable-SPFeature  -Identity MySolution_Feature1 -url http://Siteurl 

-- Remove Web Part from Web Application
Uninstall-SPSolution –Identity MySolution.wsp –WebApplication http://Siteurl

Remove-SPSolution –Identity MySolution.wsp

-- Remove Solution from Central Administration
Remove-SPSolution "MySolution.wsp"

--To see all features for a Web Application:
Get-SPFeature -WebApplication http://Siteurl 

--To see all features for a Site Collection:
Get-SPFeature -Site http://sitecollection

--To see all features for a Site:
Get-SPFeature -Web http://siteurl

//Remove Solution from All Web Application
Uninstall-SPSolution -Identity SPEnableDeploy.wsp -allwebapplications

//Remove Solution from Central Administration using Force Command
Remove-SPSolution -Identity MySolution.wsp -force

//Again Add Solution 
Add-SPSolution  -LiteralPath C:\MySolution.wsp

//Install Solution using Force Command
Install-SPSolution -Identity TestWebPart.wsp -webapplication http://Siteurl -GACDeployment -force

 I hope it will help you...

No comments:

Post a Comment