Create task in task scheduler

14/11/2012 07:57

#Create task to repeat every 2 hours from now (it's set as 'Once' and every 2 hours indefinitely)

schtasks /create /sc hourly /mo 2 /tn "Task Name" /tr "PowerShell -command c:\pathToScript\ScriptFileName.ps1"