SharePoint PowerShell cmdlets

Lately I have been doing a lot of stuff using PowerShell and avoiding Central Admin UI. It is the next best thing to MS DOS. Oops, sorry… I meant Unix shell. Okay, that sarcasm wasn’t strong enough, I admit…

Anywayz, I decided to list the PowerShell cmdlets I discover or google around so it is easy for me to get to. I will keep adding as I find more. Thanks to those who blogged or suggested neat ways of using PowerShell.

;Adding a Solution
Add-SPSolution -literalpath c:\VisualWebPartProject1.wsp
Install-SPSolution -identity VisualWebPartProject1.wsp -allwebapplications

;Verifying a solution

;Enable a Feature
Enable-SPFeature -identity VisualWebPartProject1_Feature1 -url http://yoursiteurl/

;Verify feature
Get-SPFeature | Sort-Object DisplayName

;Update a solution
Update-SPSolution -literalpath c:\VisualWebPartProject1.wsp -identity VisualWebPartProject1 -GACDeployment

;Get all webs

;Get all sites within a web

;Get all webtemplates within a web
$s = get-spsite("http://yoursite")
foreach($w in $s.allwebs) {$w, $w.webtemplate)