By default, the execution of PowerShell scripts is disabled in Windows 7. This will prevent you from not only executing any of your own scripts, but also will prevent the Windows PowerShell Modules (located in Administrative Tools in the Control Panel) from working.
1. Click the Orb (Start button).
2. Select All Programs.
3. Select Accessories.
4. Select Windows PowerShell.
5. Right-click the Windows PowerShell shortcut and select Run as administrator.
6. When the UAC window appears, click the Yes button.
7. To change the script execution policy, use the Set-ExecutionPolicy cmdlet. Input Set-ExecutionPolicy unrestricted and press Enter on your keyboard.
8. You will be prompted as to whether you wish to change the execution policy, press Y on your keyboard and press Enter.
9. Script execution is now enabled.