Some assembly required
$Action = New-ScheduledTaskAction -Execute 'powershell' -Argument '-File c:\scripts\baubau.ps1' -WorkingDirectory 'c:\scripts\' $Trigger = New-ScheduledTaskTrigger -Daily -At 1am $Settings = New-ScheduledTaskSettingsSet $Task = New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $Settings Register-ScheduledTask -TaskName 'Baubau' -Description 'Bau bau bau' -Action $Action -Trigger $Trigger -Settings $Settings -User 'baubau' -Password 'baubau' -RunLevel Highest