{"id":1131,"date":"2023-02-21T19:32:38","date_gmt":"2023-02-21T14:02:38","guid":{"rendered":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/"},"modified":"2023-02-23T23:47:53","modified_gmt":"2023-02-23T18:17:53","slug":"sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory","status":"publish","type":"question","link":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/","title":{"rendered":"Sharing knowledge to find out the orphaned GPO in Active directory"},"content":{"rendered":"<p>What is Orphaned GPOs??<\/p>\n<p>Orphaned GPOs are objects that are deleted from GMPC console but for different reasons, their corresponding folder is not removed. So in this case the folder remains in SYSVOL folder, however there is no GPO associated to it.<\/p>\n<p>How to find out these via powershell script.<\/p>\n<p>This script fetch the Orphaned GPOs of your domain environment then you can just check these GUIDs in group policy for double cross whether these are linked with any of group policy or not. then please proceed for further action.<\/p>\n<p>Please let us know if you guys need step by step plan for Orphaned GPOs removal<\/p>\n<p>=========================================================<\/p>\n<p>Just put your domain name in \u201cyourdomainhere.local\u201d<\/p>\n<p>=========================================================<\/p>\n<p>$domain = \u201cyourdomainhere.local\u201d<\/p>\n<p>$gpoGuids = @()<br \/>\n$sysvolGuids = @()<br \/>\n$gpoGuids = Get-GPO -All -Domain $domain | Select-Object @{ n=\u2019GUID\u2019; e = {$_.Id.ToString()}} | Select-Object -ExpandProperty GUID<br \/>\n$polPath = \u201c\\\\\\\\$domain\\\\SYSVOL\\\\$domain\\\\Policies\u201d<br \/>\n$polFolders = Get-ChildItem $polPath -Exclude \u2018PolicyDefinitions\u2019 | Select-Object -ExpandProperty name<br \/>\nforeach ($folder in $polFolders)<br \/>\n{<br \/>\n$sysvolGuids += $folder -replace \u2018{|}\u2019, \u201c\u201d<br \/>\n}<br \/>\nCompare-Object -ReferenceObject $sysvolGuids -DifferenceObject $gpoGuids | Select-Object -ExpandProperty InputObject<\/p>\n<p>=========================================================<\/p>\n<p>Thank You !!<\/p>\n<p>Vipan<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","question-category":[21],"question_tags":[],"class_list":["post-1131","question","type-question","status-publish","hentry","question-category-group-policy"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community\" \/>\n<meta property=\"og:description\" content=\"What is Orphaned GPOs?? Orphaned GPOs are objects that are deleted from GMPC console but for different reasons, their corresponding folder is not removed. So in this case the folder remains in SYSVOL folder, however there is no GPO associated to it. How to find out these via powershell script. This script fetch the Orphaned [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/\" \/>\n<meta property=\"og:site_name\" content=\"WindowsTechno Community\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-23T18:17:53+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/\",\"url\":\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/\",\"name\":\"Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community\",\"isPartOf\":{\"@id\":\"https:\/\/community.windowstechno.com\/community\/#website\"},\"datePublished\":\"2023-02-21T14:02:38+00:00\",\"dateModified\":\"2023-02-23T18:17:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/community.windowstechno.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Questions\",\"item\":\"https:\/\/community.windowstechno.com\/community\/questions\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Sharing knowledge to find out the orphaned GPO in Active directory\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/community.windowstechno.com\/community\/#website\",\"url\":\"https:\/\/community.windowstechno.com\/community\/\",\"name\":\"WindowsTechno Community\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/community.windowstechno.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/community.windowstechno.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/community.windowstechno.com\/community\/#organization\",\"name\":\"WindowsTechno Community\",\"url\":\"https:\/\/community.windowstechno.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/community.windowstechno.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/community.windowstechno.com\/community\/wp-content\/uploads\/2023\/02\/WindowsTechnoLogo.jpg\",\"contentUrl\":\"https:\/\/community.windowstechno.com\/community\/wp-content\/uploads\/2023\/02\/WindowsTechnoLogo.jpg\",\"width\":335,\"height\":101,\"caption\":\"WindowsTechno Community\"},\"image\":{\"@id\":\"https:\/\/community.windowstechno.com\/community\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/","og_locale":"en_US","og_type":"article","og_title":"Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community","og_description":"What is Orphaned GPOs?? Orphaned GPOs are objects that are deleted from GMPC console but for different reasons, their corresponding folder is not removed. So in this case the folder remains in SYSVOL folder, however there is no GPO associated to it. How to find out these via powershell script. This script fetch the Orphaned [&hellip;]","og_url":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/","og_site_name":"WindowsTechno Community","article_modified_time":"2023-02-23T18:17:53+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/","url":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/","name":"Sharing knowledge to find out the orphaned GPO in Active directory - WindowsTechno Community","isPartOf":{"@id":"https:\/\/community.windowstechno.com\/community\/#website"},"datePublished":"2023-02-21T14:02:38+00:00","dateModified":"2023-02-23T18:17:53+00:00","breadcrumb":{"@id":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/community.windowstechno.com\/community\/question\/sharing-knowledge-to-find-out-the-orphaned-gpo-in-active-directory\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/community.windowstechno.com\/community\/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https:\/\/community.windowstechno.com\/community\/questions\/"},{"@type":"ListItem","position":3,"name":"Sharing knowledge to find out the orphaned GPO in Active directory"}]},{"@type":"WebSite","@id":"https:\/\/community.windowstechno.com\/community\/#website","url":"https:\/\/community.windowstechno.com\/community\/","name":"WindowsTechno Community","description":"","publisher":{"@id":"https:\/\/community.windowstechno.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/community.windowstechno.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/community.windowstechno.com\/community\/#organization","name":"WindowsTechno Community","url":"https:\/\/community.windowstechno.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/community.windowstechno.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/community.windowstechno.com\/community\/wp-content\/uploads\/2023\/02\/WindowsTechnoLogo.jpg","contentUrl":"https:\/\/community.windowstechno.com\/community\/wp-content\/uploads\/2023\/02\/WindowsTechnoLogo.jpg","width":335,"height":101,"caption":"WindowsTechno Community"},"image":{"@id":"https:\/\/community.windowstechno.com\/community\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/question\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/comments?post=1131"}],"wp:attachment":[{"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/media?parent=1131"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/question-category?post=1131"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/community.windowstechno.com\/community\/wp-json\/wp\/v2\/question_tags?post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}