I never was a PowerShell or scripting guy, it is known that the scripting and PowerShell is made for Administrators and infrastructure guys.
With the release of SharePoint 2010 I noticed that Microsoft has added great support for PowerShell in SharePoint 2010. Now All SharePoint 2010 administration tasks can be performed with PowerShell.
SharePoint 2010 Management Shell – command prompt with SharePoint cmdlets loaded
In SharePoint 2010 PowerShell cmdlets there is 500+ cmdlets which supports all the Administration features through the UI and more.
PowerShell is more powerful than stsadm from functionality and performance perspectives.
For example running a stsadm command to activate feature on 5000 site collection can take more than 12 hours, but if you used the equivalent PowerShell script it will take around 30 minutes to finish the same task.
Also PowerShell supports connecting to a remote server and executing PowerShell cmdlets.
For PowerShell basics check this post PowerShell 2010: Basic Discovery - Zach Rosenfield's SharePoint Blog
Sample SharePoint PowerShell commands
Get-SPSite – this command will return list of all available site collections
Piping Get-SPSite cmdlets with Get-SPWeb will return all available webs in all site collections
Following sample gets available webs and shows their URL and template name
Get-spsite | get-spweb | Select url,webtemplate
Next sample will show how to get available services on your farm.
$farm = Get-SPFarm
$farm.Services | Select TypeName,Status
Note: All SharePoint PowerShell cmdlets their noun starts with SP
You can retrieve available SharePoint cmdlets by executing the following command
Get-command -noun sp*
Hope this post helps you start playing with PowerShell in your SharePoint farm
I will be posting later on sample scripts to create list items and site collections
also About great third party tools helps you in PowerShell scripts development
Free PowerShell books helps you get started
Schweizer IT Professional und TechNet Blog : Free Windows PowerShell workbook: server administration
Master-PowerShell | With Dr. Tobias Weltner - PowerShell.com
PowerShell and SharePoint 2010 love story – Part 2
PowerShell 2010: Basic Discovery - Zach Rosenfield's SharePoint Blog
PowerShell 2010: Basic SharePoint Cmdlets - Zach Rosenfield's SharePoint Blog
SP 2010: Intro to PowerShell Part 3 - Zach Rosenfield's SharePoint Blog
SP 2010: Intro to PowerShell Part 4 - Zach Rosenfield's SharePoint Blog
SharePoint 2010 Beta: ThreadOptions error - Zach Rosenfield's SharePoint Blog