salt.states.win_powercfg

This module allows you to control the power settings of a windows minion via powercfg.

New in version 2015.8.0.

# Set timeout to 30 minutes on battery power
monitor:
    powercfg.set_timeout:
        - value: 30
        - power: dc

salt.states.win_powercfg.set_timeout(name, value, power='ac', scheme=None)

Set the sleep timeouts of specific items such as disk, monitor, etc.

Parameters
  • name (str) --

    The setting to change, can be one of the following:

    • monitor

    • disk

    • standby

    • hibernate

  • value (int) -- The amount of time in minutes before the item will timeout

  • power (str) --

    Set the value for AC or DC power. Default is ac. Valid options are:

    • ac (AC Power)

    • dc (Battery)

  • scheme (str) --

    The scheme to use, leave as None to use the current. Default is None. This can be the GUID or the Alias for the Scheme. Known Aliases are:

    • SCHEME_BALANCED - Balanced

    • SCHEME_MAX - Power saver

    • SCHEME_MIN - High performance

CLI Example:

# Set monitor timeout to 30 minutes on Battery
monitor:
  powercfg.set_timeout:
    - value: 30
    - power: dc

# Set disk timeout to 10 minutes on AC Power
disk:
  powercfg.set_timeout:
    - value: 10
    - power: ac

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.win_powercfg.html