PowerCLI

 View Only
  • 1.  SDRS Rule automation

    Posted Jun 17, 2026 12:10 AM

    Hi all,

    I'm currently trying to automate Storage DRS (SDRS) VM anti-affinity rules on datastore clusters and ran into what like a gap in the available PowerCLI cmdlet and APIs.

    Has anyone successfully automated SDRS VM anti-affinity rules for existing VMs? and is there any supported API or PowerCLI method for full rule lifecycle management?



  • 2.  RE: SDRS Rule automation

    Posted Jun 17, 2026 09:22 AM
    Edited by ITSavant Jun 17, 2026 09:23 AM
      |   view attached

    Here's a Function (attached) I wrote a few years ago, maybe you can find some of what you need in it.
    NOTE: that often you can use methods available in the VIObjects or PowerCli accelerators.



    Attachment(s)