Summary: Use Windows PowerShell to find easy-to-use example code.
How can I find examples of using Windows PowerShell cmdlets and functions—in particular examples that begin with the verb Get?
Use the Get-Command cmdlet to find commands beginning with the verb Get, pipe the results to the Foreach-Object cmdlet, and call Get-Help on each item.
For Windows PowerShell 4.0 and Windows PowerShell 3.0:
(Get-Command -Verb get).name | foreach {get-help $psitem -example}
For Windows PowerShell 2.0 and on Windows PowerShell 1.0:
Get-Command -Verb get | foreach {get-help $_.name -example}