- //Add Solution
- Add - SPSolution - LiteralPath c: \testsolution.wsp
- //Add Sp user Solution
- Add - SPUserSolution - LiteralPath c: \testsolution.wsp - Site http: //Testsite
- //Install Solution
- Install - SPSolution - Identity testsolution.wsp - GACDeployment
- //Uninstall Solution
- Uninstall - SPSolution - Identity testsolution.wsp
- //Update Solution
- Update - SPSolution - Identity testsolution.wsp - LiteralPath c: \testsolution.wsp_1.wsp - GACDeployment
- //Remove Solution
- Remove - SPSolution - Identity testsolution.wsp
- //Install SPFeature
- Install - SPFeature - path "Testfeature" - CompatibilityLevel 14 //for sharepoint 2010
- Install - SPFeature - path "Testfeature" - CompatibilityLevel 15 //for sharepoint 2013
- //Uninstall SPFeature
- Uninstall - SPFeature - Identity "Testfeature" - CompatibilityLevel 14 //For sharepoint 2010
- Uninstall - SPFeature - Identity "Testfeature" - CompatibilityLevel 15 //For sharepoint 2013
- //Disable SPFeature
- Disable - SPFeature - identity "Testfeature" - URL http: //Testsite
- //Enable Spfeature
- Enable - SPFeature - identity "Testfeature" - URL http: //Testsite
- //how to create site collection using sharepoint powershell
- Get - SPWebTemplate
- $sitetemplate = Get - SPWebTemplate "STS#0" //here this is Team site template
- New - SPSite - Url "http://test.samplesite" - OwnerAlias "Domain\Adminuserid" - Template $sitetemplate
This code snippet for Useful powershell command in .
