In 2007 we had stsadm to perform administrative task , though in 2010 they have official deprecated and removed support for several commands in stsadm it can be used in several occasions .However stsadm has been now replaced with Powershell , that i’m sure we will be using more in the coming days.
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 :
Add-SPSolution -LiteralPath C:\krishna\MySolution.wsp
Install-SPSolution –Identity MySolution.wsp –WebApplication http://mysites
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
Remove-SPSolution –Identity MySolution.wsp
Use -SPUserSolution to perform any of the above said activities on the sandbox solutions for the respective site collections.
Enable-SPFeature –Identity FeatureName–url http://mysites
Disable-SPFeature –Identity FeatureName–url http://mysites