Implementing a precise sleep timer on Windows 11 directly through Command Prompt offers a streamlined, non-GUI approach. This method utilizes the built-in utility.
Effortless Setup Procedure
Follow these steps to configure the automatic sleep timer:
- Launch Command Prompt as Administrator: Press Win + X and select Command Prompt (Admin) or Windows Terminal (Admin). Confirm the UAC prompt.
- Set the Standby Timeout: Execute the following command, replacing `XX` with your desired timer value in minutes:
powercfg -change -standby-timeout-ac XX

- -standby-timeout-ac XX: Defines the delay before sleep when running on AC power. Set `XX` to the minutes required.
For battery-powered scenarios, modify the DC setting:
powercfg -change -standby-timeout-dc YY
- -standby-timeout-dc YY: Sets the delay before sleep when using the DC (battery) power source. Replace `YY` with the timer value in minutes.
Critical Implementation Notes
- Mandatory Administrator Rights: Standard Command Prompt lacks privileges to alter power settings.
- Compatibility Check: Verify Modern Standby support via powercfg /a. Systems displaying `Standby (S0 Low Power Idle)` require alternative methods.
- Precedence of Existing Settings: This timer adjusts the existing active power plan; conflicts with configured screen timeouts or other sleep rules may occur.
- Plan Specification: Target a specific GUID-based power plan using /setacvalueindex and /setactive parameters. Obtain plan GUIDs via powercfg /L.
Verification and Immediate Testing
Verify settings with:
powercfg /q
Locate the current active plan and inspect SUB_SLEEP > STANDBYIDLE values for AC/DC.

Conclusion
This CLI technique delivers rapid configuration for sleep delays via the powercfg -change -standby-timeout-ac XX sequence. It integrates seamlessly into scripts, serves remote administration, and offers high efficiency for experienced users.