I have been using the Powershell Scheduled Task Cmdlets to create a scheduled task on our servers.
How do I elect to \'Run whether user is logged in or not\' using
The “Run whether user is logged in or not” option in the Task Scheduler GUI is equivalent to New-ScheduledTaskPrincipal -LogonType S4U.
New-ScheduledTaskPrincipal -LogonType S4U