-
Notifications
You must be signed in to change notification settings - Fork 5
power_profile_always_on.ps1
Corey Watson edited this page Dec 1, 2025
·
1 revision
Set Always-On Power Profile.
Creates a custom "Always On - Limehawk" power plan optimized for workstations that should never sleep while on AC power. If the plan already exists, it will be reused and reconfigured. The plan is based on High Performance settings.
This script creates and configures a custom power plan designed for systems that need to remain awake and accessible at all times (such as servers, monitoring stations, or remote access workstations). The plan prevents sleep and hibernation on AC power while maintaining reasonable battery-saving settings for portable devices.
- Windows 10/11 or Windows Server 2016+
- Administrator privileges
- High Performance power plan must exist
-
$customPlanName: Name of the custom power plan (default: "Always On - Limehawk") -
$displayTimeoutAC: Display timeout on AC power (minutes, default: 30) -
$displayTimeoutDC: Display timeout on battery (minutes, default: 10) -
$diskTimeoutAC: Hard disk timeout on AC power (minutes, default: 60) -
$diskTimeoutDC: Hard disk timeout on battery (minutes, default: 30) -
$standbyTimeoutAC: Sleep timeout on AC power (0 = never, default: 0) -
$standbyTimeoutDC: Sleep timeout on battery (minutes, default: 20) -
$hibernateTimeoutAC: Hibernate timeout on AC power (0 = never, default: 0) -
$hibernateTimeoutDC: Hibernate timeout on battery (minutes, default: 45)
- Validates all hardcoded timeout values and plan name
- Verifies script is running with Administrator privileges
- Checks if custom power plan already exists
- Creates or reuses the custom power plan
- Sets the custom plan as active
- Configures all power timeouts
- Disables hibernation on desktops (no battery)
- No secrets in logs
- All operations are local
-
0= Success -
1= Failure
[ INPUT VALIDATION ]
--------------------------------------------------------------
All required inputs are valid
[ POWER PLAN SETUP ]
--------------------------------------------------------------
Custom Plan Name : Always On - Limehawk
Plan Status : Creating new plan
Active Plan : Always On - Limehawk
[ APPLYING POWER SETTINGS ]
--------------------------------------------------------------
Display Timeout (AC) : 30 minutes
Standby Timeout (AC) : 0 (Never)
[ FINAL STATUS ]
--------------------------------------------------------------
Power plan configured successfully
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- v2.0.0 (2024-12-01) - Migrated from SuperOps - removed module dependency
- v1.0.0 (2025-09-12) - Initial version
- View Script Source
- Scripts - Back to script index