Forge Home

windows_power

Module to manage the power settings on Windows

14,084 downloads

112 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.0.0 (latest)
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 2.0.0
  • 1.0.0
released May 21st 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-windows_power', '4.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-windows_power
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-windows_power --version 4.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/windows_power — version 4.0.0 May 21st 2024

puppet-windows_power

Module description

Puppet module for managing Windows hibernation settings, power schemes and power devices (or power request overrides respectively).

Setup, Usage, Reference

Summary:

  • use class windows_power to manage Windows power devices (physical, logical and virtual); this wraps the defined type windows_power::device
  • use class windows_power::hibernate to manage Windows hibernate settings
  • use class windows_power::scheme to manage Windows power scheme
  • shipped fact power_devices contains all kind of system's power devices, their various wakeup capabilities and their power request overrides
  • shipped fact power_schemes contains the system's power schemes and their activation state

See REFERENCE.md for further details and practical examples.

Special notice for v4.0.0

Version 4.0.0 is a complete rewrite and modernization of the previous module and breaks with configuration compatibility.

It also drops support for legacy Windows systems and removes functionality targeting those legacy systems. If you have any of those systems in place (such as Windows XP or Windows Server 2008) don't update.

Limitations

Due to the nature of Windows' way to configure things, we can't just write a config file with desired settings and tell Windows to apply that (or something similar). As well we're not able to determine the current state of some settings (e.g. the timeouts in a power scheme) at all.

Therefore, some commands are applied with every Puppet run to ensure the desired state. Additionally, it might need more than one Puppet run to achieve the final state.

We know that this is very bad Puppet style and we did our best to keep this as minimal as possible. As well we put a lot of effort into making the module fail-safe (e.g. not configuring the wrong power scheme if a new one was created but hasn't been successfully activated yet) at the cost of "might need more than one run".

This module assumes that your system is not managed by an Active Directory controller. We have no way of testing what happens if your system (or parts of it including the power management) is controlled this way and you should use the AD's capabilities of managing power-things then anyways.

Also note that device names, scheme names and similar are subjected to localization (whyever ...). This means that you will have a device System timer on an English system and a Systemzeitgeber on a German system for example. Configuring devices and overrides in an environment with mixed installation languages is probably quite annoying as you will have to create different profiles for different languages with the corresponding device names.

If you have any ideas, suggestions, improvements ... please get in touch with us.

Development

Development happens on GitHub in the well known way (fork, PR, issue, etc.).

Please feel free to report problems, suggest improvements, drop new ideas or teach us how to handle things better.