{"id":107,"date":"2014-06-26T15:17:16","date_gmt":"2014-06-26T19:17:16","guid":{"rendered":"http:\/\/blog.metcorp.org\/?p=107"},"modified":"2014-06-09T21:53:01","modified_gmt":"2014-06-10T01:53:01","slug":"powershell-get-active-directory-instantiation-date","status":"publish","type":"post","link":"https:\/\/adsecurity.org\/?p=107","title":{"rendered":"PowerShell: Get Active Directory Instantiation Date"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>The Scripting Guys blog posted a <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2012\/01\/05\/how-to-find-active-directory-schema-update-history-by-using-powershell.aspx\">very useful script on how to determine when the Active Directory Forest was stood up<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><code><br \/>\n#############################<br \/>\n# Get AD Instantiation Date #<br \/>\n#############################<br \/>\n# Code from: http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2012\/01\/05\/how-to-find-active-directory-schema-update-history-by-using-powershell.aspx<br \/>\nwrite-output \"Checking Active Directory Creation Date... \" `r<br \/>\nwrite-output \"Displaying AD partition creation information \" `r<\/p>\n<p>Import-Module ActiveDirectory<br \/>\nGet-ADObject -SearchBase (Get-ADForest).PartitionsContainer `<br \/>\n-LDAPFilter \"(&amp;(objectClass=crossRef)(systemFlags=3))\" `<br \/>\n-Property dnsRoot,nETBIOSName,whenCreated | Sort-Object whenCreated | Format-Table dnsRoot,nETBIOSName,whenCreated -AutoSize<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; The Scripting Guys blog posted a very useful script on how to determine when the Active Directory Forest was stood up. &nbsp; ############################# # Get AD Instantiation Date # ############################# # Code from: http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2012\/01\/05\/how-to-find-active-directory-schema-update-history-by-using-powershell.aspx write-output &#8220;Checking Active Directory Creation Date&#8230; &#8221; `r write-output &#8220;Displaying AD partition creation information &#8221; `r Import-Module ActiveDirectory Get-ADObject -SearchBase &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/adsecurity.org\/?p=107\">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],"tags":[39,38,22],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-getadforest","tag-getadobject","tag-powershellcode","item-wrap"],"_links":{"self":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/107","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=107"}],"version-history":[{"count":1,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}