{"id":873,"date":"2014-12-05T19:00:01","date_gmt":"2014-12-06T00:00:01","guid":{"rendered":"http:\/\/adsecurity.org\/?p=873"},"modified":"2015-01-02T20:28:45","modified_gmt":"2015-01-03T01:28:45","slug":"windows-computer-primary-group-ids","status":"publish","type":"post","link":"https:\/\/adsecurity.org\/?p=873","title":{"rendered":"Windows Computer Primary Group IDs"},"content":{"rendered":"<p>Primary Group IDs are the RIDs for the Domain groups. The full list is here: <a title=\"Interesting Windows Computer &amp; Active Directory Well-Known Security Identifiers (SIDs)\" href=\"https:\/\/adsecurity.org\/?p=1001\">Interesting Windows Computer &amp; Active Directory Well-Known Security Identifiers (SIDs)<\/a>.<\/p>\n<ul>\n<li>515 &#8211; Domain Computers<\/li>\n<li>516 &#8211; Domain Controllers (writable)<\/li>\n<li>521 &#8211; Domain Controllers (Read-Only)<\/li>\n<\/ul>\n<p>This information helps filter computer objects to return only the desired computer type.<\/p>\n<p><span style=\"text-decoration: underline;\">Domain Computers (Workstation &amp; Servers &#8211; No Domain Controllers)<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Import-Module ActiveDirectory<br \/>\nGet-ADComputer -Filter {PrimaryGroupID -eq 515}<\/span><\/p><\/blockquote>\n<p><span style=\"text-decoration: underline;\">Domain Controllers (All)<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Import-Module ActiveDirectory<br \/>\nGet-ADComputer -Filter\u00a0{PrimaryGroupID -ne 516}<\/span><\/p><\/blockquote>\n<p><span style=\"text-decoration: underline;\">Domain Controllers (RODCs only)<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Import-Module ActiveDirectory<br \/>\nGet-ADComputer -Filter\u00a0{PrimaryGroupID -eq 521}<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Primary Group IDs are the RIDs for the Domain groups. The full list is here: Interesting Windows Computer &amp; Active Directory Well-Known Security Identifiers (SIDs). 515 &#8211; Domain Computers 516 &#8211; Domain Controllers (writable) 521 &#8211; Domain Controllers (Read-Only) This information helps filter computer objects to return only the desired computer type. Domain Computers (Workstation &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/adsecurity.org\/?p=873\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,2],"tags":[20,376,375,373,374,22,372,103,371],"class_list":["post-873","post","type-post","status-publish","format-standard","hentry","category-powershell","category-technical-reference","tag-activedirectory","tag-domaincontrollers","tag-findingdcs","tag-findingdomaincomputer","tag-findingrodcs","tag-powershellcode","tag-primarygroupid","tag-readonlydomaincontroller","tag-windowscomputer","item-wrap"],"_links":{"self":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=873"}],"version-history":[{"count":3,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/873\/revisions"}],"predecessor-version":[{"id":1012,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/873\/revisions\/1012"}],"wp:attachment":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}