@echo off cd %~dp0 if "%1"=="admin" goto admin rem Search for PsExec where /q psexec || ( echo You need PsExec to run this batch file. pause>nul exit ) rem Fix PsExec hang sc stop psexesvc>nul sc delete psexesvc>nul rem Run this batch file with PsExec psexec -nobanner -s %windir%\System32\cmd.exe /k "%~f0" admin || ( echo. echo Run this batch file as administrator. pause>nul ) exit /b :admin rem Disable tasks that are responsible for waking the PC schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\AC Power Download" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Backup Scan" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan Static Task" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\UpdateModelTask" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\AC Power Install" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Universal Orchestrator Idle Start" schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Universal Orchestrator Start" rem List all tasks under UpdateOrchestrator schtasks /query /tn \Microsoft\Windows\UpdateOrchestrator\ echo. echo Add enabled tasks to the batch file. echo. rem This should print that you have no active wake timers powercfg /waketimers