{"id":377,"date":"2020-04-23T06:09:51","date_gmt":"2020-04-23T06:09:51","guid":{"rendered":"http:\/\/michaelschultz.net\/tech\/?p=377"},"modified":"2020-04-23T06:09:51","modified_gmt":"2020-04-23T06:09:51","slug":"configmgr-client-boundary-and-boundary-group-memberships-sql-query","status":"publish","type":"post","link":"https:\/\/michaelschultz.net\/tech\/configmgr-client-boundary-and-boundary-group-memberships-sql-query\/","title":{"rendered":"ConfigMgr Client Boundary and Boundary Group memberships SQL Query"},"content":{"rendered":"\n<p>ConfigMgr current branch SQL query to return the boundaries and boundary groups systems are part of.<\/p>\n<p><a href=\"https:\/\/github.com\/NecroMonkey\/vault\/blob\/master\/SQL\/client_boundary_membership_update.sql\">https:\/\/github.com\/NecroMonkey\/vault\/blob\/master\/SQL\/client_boundary_membership_update.sql<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\">\n\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:500px;\"><div class=\"text codecolorer\">SELECT DISTINCT <br \/>\nsysr.Netbios_Name0,<br \/>\nipr.Name as &amp;#91;Boundary],<br \/>\nipr.BoundaryType as &amp;#91;Type],<br \/>\nbg.Name AS &amp;#91;Boundary Group]<br \/>\nFROM &nbsp; &nbsp; v_R_System AS sysr INNER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System_IP_Address_ARR AS ip ON ip.ItemKey = sysr.ResourceID AND ip.NumericIPAddressValue &amp;lt;&gt; 0 INNER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v_RA_System_IPSubnets AS sub ON sub.ResourceID = sysr.ResourceID LEFT OUTER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v_RA_System_IPv6Prefixes AS v6 ON v6.ResourceID = sysr.ResourceID INNER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BoundaryEx AS ipr ON ipr.BoundaryType = 3 AND ip.NumericIPAddressValue BETWEEN ipr.NumericValueLow AND ipr.NumericValueHigh OR<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ipr.BoundaryType = 1 AND ipr.Value = sysr.AD_Site_Name0 OR<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ipr.BoundaryType = 0 AND ipr.Value = sub.IP_Subnets0 OR<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ipr.BoundaryType = 2 AND ipr.Value = v6.IPv6_Prefixes0 INNER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vSMS_BoundaryGroupMembers as bgm ON ipr.BoundaryID = bgm.BoundaryID INNER JOIN<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vSMS_BoundaryGroup as bg ON bgm.GroupID = bg.GroupID<br \/>\nGROUP BY sysr.Netbios_Name0, ipr.Name, ipr.BoundaryType, bg.Name<br \/>\nORDER BY sysr.Netbios_Name0, ipr.Name, bg.Name<\/div><\/div>\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ConfigMgr current branch SQL query to return the boundaries and boundary groups systems are part of. https:\/\/github.com\/NecroMonkey\/vault\/blob\/master\/SQL\/client_boundary_membership_update.sql<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,26,17],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-configmgr","category-queries","category-sql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p98a2r-65","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":2,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/posts\/377\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelschultz.net\/tech\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}