diff --git a/Windows-Scripts/IM_SO_TIRED_BOSS.ps1 b/Windows-Scripts/IM_SO_TIRED_BOSS.ps1 index 752c52f..90cb03e 100644 --- a/Windows-Scripts/IM_SO_TIRED_BOSS.ps1 +++ b/Windows-Scripts/IM_SO_TIRED_BOSS.ps1 @@ -19,6 +19,8 @@ Write-Host "`nREBOOTING AT $RebootTime`n" # Start-Job to fork the script block to background so it can proceed with the timer/shutdown even if no interaction with alert box Start-Job -ScriptBlock { + $RebootTime = $using:RebootTime + # add the presentation framework in Add-Type -AssemblyName PresentationFramework @@ -30,4 +32,4 @@ Start-Job -ScriptBlock { Start-Sleep -Seconds $WaitSeconds # Force reboot with no warning -# Restart-Computer -Force \ No newline at end of file +Restart-Computer -Force \ No newline at end of file