I m working to automate the planned failover of protection domain. We are very familiar with powershell and so I m wondering what is the cmdlet to retrieve the status of protection domain (Enabled- in sync, disabled , pending ...) ?
I searched on the documentation but i didn’t find it
Here are some PS CMDLETS you can use to query your PD.
In the PDF Here You will find the complete method to install these CMD Lets and use them for several purposes.
Thanks for the reply.
I have found already these cmdlets. But, when i promote a protection domain for a stretched cluster, i would like to get the status of it when it has been promoted to ensure the action is a success (Enabled in sync). i don’t find in any cmdlets a way to get this information.
i don’t think there is a PS cmdlet that can get you the status (at least i couldn’t find it).
Here is the Rest API call that would help you get the requested information:
You’ll have to insert the IP address of one of the CVMs and put the PD name at the end.
You can use various tools to filter the output, i personally prefer jq. Here is an example:
Hope that it helps.