Skip to content

Instantly share code, notes, and snippets.

@qwerty12
qwerty12 / enable-all-advanced-power-settings.ps1
Last active November 2, 2021 09:07 — forked from raspi/enable-all-advanced-power-settings.ps1
Enable all advanced power settings in Windows.
# List all possible power config GUIDs in Windows
# Run: this-script.ps1 | Out-File powercfg.ps1
# Then edit and run powercfg.ps1
# (c) Pekka "raspi" Järvinen 2017
# https://stackoverflow.com/a/22156833
if (-not ([System.Management.Automation.PSTypeName]'PowrProf').Type)
{
Add-Type -TypeDefinition @"
using System;