How can I change the default sleep timeout from command line?

  1. hsehestedt's Avatar
    Posts : 2,213
    Windows 10 Pro, 20H2
       #1

    How can I change the default sleep timeout from command line?


    When I configure a Virtual Machine, I run a script that I have created that sets all sorts of settings within Windows to my personal preferences.

    By default, Windows configures itself to go to sleep after 30 minutes of inactivity. I like to disable this by setting the timeout to zero. Is anyone familiar with a way of doing this from the command line or through a registry setting? The goal here is for me to be able to add this to my script.
      My Computers

  2. dalchina's Avatar
    Posts : 30,604
    Win 10 Pro (1903)
       #2

    PowerCfg - Windows CMD - SS64.com

    - looks like
    /Change settingvalue
    /x setting value
    Modify one of the following settings in the current power scheme:
    monitor-timeout-ac minutes
    monitor-timeout-dc minutes
    disk-timeout-ac minutes
    disk-timeout-dc minutes
    standby-timeout-ac minutes
    standby-timeout-dc minutes

    hibernate-timeout-ac minutes
    hibernate-timeout-dc minutes
    Setting any value to 0 will set the timeout=Never
    AC settings are used when the system is on AC power. DC settings on battery power.

    (Not tried it)
      My Computers

  3. hsehestedt's Avatar
    Posts : 2,213
    Windows 10 Pro, 20H2
    Thread Starter
       #3

    Thanks, much appreciated.
      My Computers

  4. dalchina's Avatar
    Posts : 30,604
    Win 10 Pro (1903)
       #4

      My Computers

  5. Brink's Avatar
    Posts : 57,065
    64-bit Windows 10 Pro for Workstations build 21382
       #5
      My Computers

  6. dalchina's Avatar
    Posts : 30,604
    Win 10 Pro (1903)
       #6

      My Computers

  7. hsehestedt's Avatar
    Posts : 2,213
    Windows 10 Pro, 20H2
    Thread Starter
       #7

    Thanks for the tutorial, Brink.
      My Computers

  8. Brink's Avatar
    Posts : 57,065
    64-bit Windows 10 Pro for Workstations build 21382
       #8

    hsehestedt said:
    Thanks for the tutorial, Brink.
    You're most welcome.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:22.
Find Us




Windows 10 Forums