Listing the members of a DRS group

Now that you know how to correlate a MoRef back to a VM name, and how to create a DRS group, the next step is to be able to audit and list the members of DRS groups. Getting the list of groups is fairly simple. In fact, you already attempted to do this in the previous recipe. However, the returned information will be in the form of MoRefs for VM or Hosts. You need to convert these so that you can see the membership.

Getting ready

To begin this recipe, you will need a PowerCLI window and an active connection to a vCenter Server. You should also have a virtual machine DRS group created and virtual machines assigned to the group.

How to do it…

In order to audit and list the members of DRS groups, perform the following ...

Get PowerCLI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.