If you use PowerShell 3.0 and the ISE editor, then here are the three most useful tricks you should know:
1. Press CTRL+J to open a list of predefined code snippets for loops, conditions, functions, and workflows. This will get you started in no time!
2. When you select code, pressing F8 will execute the selected code only. This works even inside commented areas, so you could use <# and #> to place some sample code into your script, then to execute, select the code and press F8.
3. To get extensive help for cmdlets, click on a cmdlet in your script and press F1.