power_plans_add_default.ps1 - limehawk/rmm-scripts GitHub Wiki
power_plans_add_default.ps1
Add Default Power Plans.
Overview
Adds the four standard Windows power plans (High Performance, Ultimate Performance, Power Saver, and Balanced) by duplicating them from their default GUIDs. Useful for restoring missing power plans on systems where they have been removed or are unavailable.
Purpose
This script restores the standard Windows power plans that may be missing from a system. It uses the built-in Windows power plan GUIDs to duplicate and recreate all default power plans.
Prerequisites
- Windows 10/11 or Windows Server 2016+
- Administrator privileges
- powercfg.exe available (standard Windows component)
Configuration
Required Inputs
None - uses standard Windows power plan GUIDs
Behavior
- Duplicates High Performance power plan
- Duplicates Ultimate Performance power plan (Win10 1803+)
- Duplicates Power Saver power plan
- Duplicates Balanced power plan
- Reports success/failure for each plan
Security Notes
- No secrets in logs
- Uses standard Windows power plan GUIDs
Exit Codes
0= Success (all plans added)1= Failure
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
No inputs required
[ ADDING POWER PLANS ]
--------------------------------------------------------------
High Performance : Added successfully
Ultimate Performance : Added successfully
Power Saver : Added successfully
Balanced : Added successfully
[ FINAL STATUS ]
--------------------------------------------------------------
Result : SUCCESS
All power plans added successfully
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- v1.0.0 (2024-12-01) - Initial release - converted from batch script
Links
- View Script Source
- Scripts - Back to script index