Run Powershell Script Via Command Line Or Task Scheduler

under Programming PowerShell Gist

 

To schedule PowerShell scripts to run via command line (or as a Task Scheduler task), using the following syntax:

powershell.exe -Command "& {filename}"