# Set window title $host.UI.RawUI.WindowTitle = "No Sleep" # Yellow text on black background $Host.UI.RawUI.ForegroundColor = "Yellow" $Host.UI.RawUI.BackgroundColor = "Black" Clear-Host # Set default message directly $message = "This computer is being kept awake..." # Only the absolute basics $ComputerName = $env:COMPUTERNAME $Username = $env:USERNAME # One-time header Write-Host @" Keeping this computer awake.. $message ============================================ Hostname : $ComputerName Username : $Username ============================================ "@ -ForegroundColor Yellow # Infinite loop - keeps the PC awake forever while ($true) { # Simulate activity (Scroll Lock toggle - completely invisible) $wsh = New-Object -ComObject WScript.Shell $wsh.SendKeys("{SCROLLLOCK}{SCROLLLOCK}") Start-Sleep -Seconds 50 }