When were my domains created - quick-hitters ~ My blog about Active Directory and everything else

Monday, April 13, 2009

When were my domains created - quick-hitters

This will be the first post in what I'll call "quick-hitters". Short to the point posts to accomplish a specific task.

So you want to find a quick way to know when the domains in your forest were created.

This is where I really like a tool called ADFIND by Active Directory MVP Joe Richards. Joe is one of my favorite people in the AD world. Really smart but also a cool guy that is always willing to help.

The command is

adfind -gcb -f objectcategory=domain name whencreated -tdcgt

In my example screen shot I only have one domain in that forest in my lab but it works across your forest becasue of the -gcb switch. If you only want to search your domain you can replace -gcb with -default.




  1. What if I work in an environment that does not allow the use of third-party(zero support) code?

  2. @Garrett

    Well first joeware should be used everywhere :)...but yes I know those restrictive places exist.

    You can go into ADSIEdit and see the value. Expand your domain partition. Right click on your Domain folder and select properties then you can go and view the whenCreated attribute.

    I'll give dsquery a try too and let you know if I can pull the info out from that tool.

    Thanks for writing!!

  3. Garrett,
    Then that place must allow the Microsoft's native tools, lets say PowerShell. Here is a PoSH way to accomplish the same task.

    Get-QADobject "dc=bigcompany,dc=local" | select CreationDate

  4. Good suggestion Rick, I bet they won't even let him install the Quest AD cmdlets.

  5. Oops, I suggested a Quest + PowerShell solution. Well, what about installing ADWS (which is now available for pre-Windows 2008 DCs and is purely Microsoft) so that same command can be run, something along the lines of;

    Get-ADobject "dc=bigcompany,dc=local" | select CreationDate

  6. Is a 2008 R2 DC needed in order to install ADWS. I haven't played with it yet.

    Good comment as usual Rick!

  7. Thanks Mike and No, ADWS has been RTW as an add-on for pre-2008 DCs. It is great thing being able to use native AD cmdlets in your existing environment without having an 08 DC.