Powershell scripts are more faster , unlike stsadm they help us in accessing file system and registry . Handling powershell scripts are relatively easier , yet another advantage of using powershell is unlike stsadm you need not restart services after your wsp deployments. Though i'm a great fan of stsadm i like using powershell because of my above observations.
Some of the commands i have executed with powershell :
1.Install Solution
Add-SPSolution C:\krishna\MySolution.wsp
2.Deploy Solution
Install-SPSolution –Identity MySolution.wsp –WebApplication http://mysites
-GACDeployment||–CASPolicies
We can use -AllWebApplications , if not to limit our deployment to a single application.
3. Retract Solution
Uninstall-SPSolution –Identity MySolution.wsp –WebApplication http://mysites
4.Remove Solution
Remove-SPSolution –Identity MySolution.wsp
Use -SPUserSolution to perform any of the above said activities on the sandbox solutions for the respective site collections.
5.Activate Feature
Enable-SPFeature –Identity FeatureName–url http://mysites
6.Deactivate Feature
Disable-SPFeature –Identity FeatureName–url http://mysites