Run PowerShell script via command line (or Task Scheduler)

To schedule PowerShell scripts to run via command line (or as a Task Scheduler task), using the following syntax:
powershell.exe -Command "& {filename}"

Leave a Reply

Your email address will not be published. Required fields are marked *