Wednesday, June 06, 2012

Powershell Commands (Mostly Used)

Here is collection of commonly used powershell cmdlets.
More details :
http://technet.microsoft.com/en-us/library/ee906565.aspx

Add-SPSolution(Uploads a SharePoint solution package to the farm.)
Add-SPSolution -LiteralPath c:\contoso_solution.wsp

Remove-SPSolution(Removes a SharePoint solution from a farm.)
Remove-SPSolution -Identity contoso_solution.wsp

Install-SPSolution(Deploys an installed SharePoint solution in the farm.)
Install-SPSolution -Identity contoso_solution.wsp -GACDeployment

Uninstall-SPFeature(Uninstalls an installed feature definition.)
Uninstall-SPFeature -path "MyCustomFeature"

Add-SPUserSolution(Uploads a new sandboxed solution to the solution gallery.)
Add-SPUserSolution -LiteralPath c:\contoso_solution.wsp -Site http://sitename

Disable-SPFeature(Disables an installed SharePoint Feature at a given scope.)
Disable-SPFeature –identity "MyCustom" -URL http://somesite

Enable-SPFeature(Enables an installed SharePoint Feature at the given scope.)
Enable-SPFeature –identity "MyCustom" -URL http://somesite

Get-SPFeature(Returns the SharePoint Features based on a given scope)
Get-SPSite http://somesite | Get-SPWeb –Limit ALL |%{ Get-SPFeature –Web $_ } | Select DisplayName,ID -Unique

Install-SPFeature(Installs a SharePoint Feature by using the Feature.xml file.)
Install-SPFeature -path "MyCustomFeature"

Uninstall-SPFeature(Uninstalls an installed feature definition)
Uninstall-SPFeature -path "MyCustomFeature"


 

No comments:

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...