Automation

 View Only
  • 1.  PowerCLI DRS automation level

    Posted Dec 12, 2021 12:05 PM

    Hello,

    I am new to PowerCli/Powershell but i am really impressed by the flexibility.

    I have made a script that reverts a couple of 1000 VMs to previous snapshots for my usecase and integrated with Ansible etc for scaling up as required.

    The one part that i can't figure out is how to change the cluster DRS automation level to "partlyautomated" from "fullyautomated".

    I have looked at https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393639#M6861 however a lot of this is still new to me and I wasn't sure if anyone can offer a simple command(s).

    Any help would be appreciated.



  • 2.  RE: PowerCLI DRS automation level

    Posted Dec 12, 2021 12:12 PM

    The Set-Cluster cmdlet with the DrsAutomationLevel parameter should allow you to do that.



  • 3.  RE: PowerCLI DRS automation level

    Posted Dec 12, 2021 12:28 PM

    Perfect thankyou.

    Set-Cluster * (cluster name) -DrsAutomationLevel PartiallyAutomated

    Amateur mistake, i was using get-cluster to try and set something.