Search notes:

Windows service: Schedule

The Task Scheduler.

Run a powershell script at start up

The following sequence of Powershell commands configures the task schuduler such that it starts a powershell script when the system starts up:
$act = new-scheduledTaskAction      -execute powershell.exe -argument '-file c:\project-X\Health-monitor.ps1'
$trg = new-scheduledTaskTrigger     -atStartup
$prc = new-scheduledTaskPrincipal   -userId "NT AUTHORITY\SYSTEM" -logonType ServiceAccount
$set = new-scheduledTaskSettingsSet -executionTimeLimit (new-timeSpan -seconds 0)  # Make sure task is not stopped if it runs longer than a given period.

register-scheduledTask -taskName 'Health monitor'  -action $act -trigger $trg -settings $set -principal $prc # -runLevel Highest

See also

schtasks.exe is the Task Scheduler Configuration Tool. Its deprecated cousin is at.exe.
taskschd.msc
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree
Programs that might automatically be started in Windows
new-scheduledTaskAction

Index