I need to create a script (scheduled to run at least once a day) that will check the datastore names for VMs in one or more stretched clusters and their VM DRS group membership and add them (or change them) to the correct VM DRS group based on the first several characters of a datastore name (if it starts with xyz it's at this site, if it starts with abc it's at this site). Would also like to have it send an email with what was found and what changes were made.
Another thought would be including a check to see if someone accidentally split the disks for a VM so they're hosted on datastores at separate sites.
Since I'm still a PowerCLI noob, any assistance/feedback would be appreciated!