Configure ESX Power Management with PowerCLI

View current Power Management Policy

$vmhost = Get-VMHost -Name ESX01  
$vmhostview = Get-View -ViewType Hostsystem -Filter @{"Name"=$($vmhost).Name} -Property ConfigManager.PowerSystem  
$powerpolicy = Get-View $vmhostview.ConfigManager.PowerSystem  
$powerpolicy | Select -ExpandProperty Info | Select -ExpandProperty CurrentPolicy

Key             : 1
Name            : PowerPolicy.static.name
ShortName       : static
Description     : PowerPolicy.static.description
DynamicType     : 
DynamicProperty :  
Key ShortName GUI Equivilent
1 static High Performance
2 dynamic Balanced
3 low Low power
4 custom Custom
Edit Power Policy Settings Screenshot
Edit Power Policy Settings Screenshot
$vmhostview = Get-View -ViewType Hostsystem -Filter @{"Name"=$($vmhost).Name} -Property ConfigManager.PowerSystem 
$powerpolicy = Get-View $vmhostview.ConfigManager.PowerSystem

#Configure 
$powerpolicy.ConfigurePowerPolicy(1)

Environmental Information:
ESX 5.5

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.