PowerCLI

  • 1.  PowerCLI Commands to Keep the Maintenance Mode

    Posted Jan 16, 2025 04:24 AM

    Newbie here.. !! 

    set-Vmhost -VMhost Hostname  -state "Maintenance"  is setting the host into the Maintenance. 

    is there a way to Pass a command to uncheck this settings "Move powered-off and suspended virtual machines to other hosts in the cluster"

    Basically i want keep the Powered off VM's in the same Host (Even if the DRS is enabled at the cluster level). 



  • 2.  RE: PowerCLI Commands to Keep the Maintenance Mode

    Posted Jan 16, 2025 04:26 AM

    Not that I know of.
    You will have to disable DRS temporarily to get that effect.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 3.  RE: PowerCLI Commands to Keep the Maintenance Mode

    Posted Jan 23, 2025 03:14 AM

    should work if you leave out the -Evacuate parameter or set it -Evacuate:$false
    Set-VMHost Command | Vmware PowerCLI Reference