{"id":2771,"date":"2020-01-12T12:01:56","date_gmt":"2020-01-12T05:01:56","guid":{"rendered":"http:\/\/rachmadona.net\/?p=2771"},"modified":"2020-01-12T12:01:56","modified_gmt":"2020-01-12T05:01:56","slug":"how-to-get-list-of-protected-vm-in-srm-part-2","status":"publish","type":"post","link":"https:\/\/rachmadona.net\/?p=2771","title":{"rendered":"How to Get List of Protected VM in SRM \u2013 Part 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In previous post  <a href=\"https:\/\/rachmadona.net\/how-to-get-list-of-protected-vm-in-srm-part-1\/\">https:\/\/rachmadona.net\/how-to-get-list-of-protected-vm-in-srm-part-1\/<\/a>  we discussed how to export the list of protected VM on SRM. Now, we are going to have further detail report to get the list of such against protection group detail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Post you get the VM name detail along with it&#8217;s vmid (see previous post), this time you have to run following command to query the protection group detail as well as vmid.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select vmid, parentgroupmoid from pdr_protectedvm;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By executing above command you will get below list. Copy all and paste into excel for us to do VLOOKUP.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2020\/01\/image-6.png\" alt=\"\" class=\"wp-image-2772\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To derive the vmid value only you have to use &#8220;Text to column&#8221; for separating the cell as figured above. So, you will have vmid column with &#8220;vm-xxxx&#8221; format and parentgroumoid. Do the same thing for the exported result for previous post therefore you can do VLOOKUP.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2020\/01\/image-7.png\" alt=\"\" class=\"wp-image-2773\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to find out the protection group details by executing below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select name,mo_id from pdr_protectiongroup;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2020\/01\/image-8.png\" alt=\"\" class=\"wp-image-2774\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Do the same thing so you will get vm-protectiongroup-xxxx only along with it&#8217;s protection group detail. Once done combine all of them into single excel file and you have finished the task.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2020\/01\/image-9.png\" alt=\"\" class=\"wp-image-2775\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So, by the end of this post, you will have list of VM which protected by SRM along with their protection group name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voila!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In previous post https:\/\/rachmadona.net\/how-to-get-list-of-protected-vm-in-srm-part-1\/ we discussed how to export the list of protected VM on SRM. Now, we are going to have further detail report to get the list of such against protection group detail. Post you get the VM name detail along with it&#8217;s vmid (see previous post), this time you have to run&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,24,25],"tags":[134,172,394,409],"class_list":["post-2771","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-virtualization","category-vmware","tag-db","tag-export-data","tag-site-recovery-manager","tag-srm"],"_links":{"self":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2771"}],"version-history":[{"count":0,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2771\/revisions"}],"wp:attachment":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}