There was just one problem with that for me - I actually need to step away from my machine from time to time to brew some coffee, and while I was gone, the computer would go to sleep, and I needed to wake it up, enter my credentials. function Drink-Espresso { Write-Host "[info] Currently ordering a double shot of espresso..." $Signature = @" [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern void SetThreadExecutionState(uint esFlags); "@ $ES_DISPLAY_REQUIRED = [ uint32 ] "0x00000002" $ES_CONTINUOUS = [ uint32 ] "0x80000000" $JobName = "DrinkALotOfEspresso" try { $BackgroundJob = Start-Job -Name $JobName -ScriptBlock { $STES = Add-Type -MemberDefinition $args [ 0 ] -Name System -Namespace Win32 -PassThru $STES :: SetThreadExecutionState ( $args […