I am testing met DPM. But it want to be able to set the DPM settings to Off and Automatic and power on esx hosts, because DPM doesn't have a scheduler and we want our comple cluster to be up and running during business hours.
I am browing the SDK but i can't find a way to configure the DPM settings.
Rob, you can configure the DPM settings via the ReconfigureComputeResource_Task method.
The cluster DPM settings are defined in the ClusterDpmConfigInfo object.
In the array with ClusterDpmHostConfigSpec objects you can configure the per host DPM settings.
A short example
$clus = Get-Cluster <cluster-name> | Get-View $spec = New-Object vmware.Vim.ClusterConfigSpecEx $spec.dpmConfig = New-Object VMware.Vim.ClusterDpmConfigInfo $spec.DpmConfig.DefaultDpmBehavior = "automated" $spec.DpmConfig.Enabled = $true $clus.ReconfigureComputeResource_Task($spec, $true)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Luc,
Thanks. I will try to create a working script this week.