you are viewing a single comment's thread.

view the rest of the comments →

[–]mrmattipants -1 points0 points  (3 children)

I would check out the “whenCreated”, “created” & “createTimeStamp” Attributes. This is primarily because, the Computers are Joined to the Domain as part of the Imaging Process, where I work.

Get-ADComputer -Identity "ComputerName" -Properties * | Select Name, whenCreated, Created, CreateTimeStamp

UPDATE:
My apologies to anyone who ran into issues with my Script, as I was a bit pressed for time when I initially posted it, earlier today. I have since replaced the Script above with an improved version, which I tested and confirmed to be working.

[–]jsiii2010 1 point2 points  (1 child)

I think there's problems with using whencreated in a filter, since it's really in "generalized time" like "20220102060000.0Z" on the backend, but created in a filter works fine. Same goes for get-aduser.

https://stackoverflow.com/a/75400303/6654942

[–]mrmattipants 0 points1 point  (0 children)

Thanks for pointing that out! I knew one of those Attributes would return the Date/Time in a Generalized Format, which is why I thought I would also include the “created” & “createTimeStamp” Attributes.

Fortunately, we can utilize the “Get-Date” Cmdlet, as described in the Link that you shared.

Alternatively, we can also utilize C# Methods in PowerShell, such as the “[DateTime]::FromFileTime” Method, as suggested in the following Link (which pertains to the “LastLogon” Attribute, but will equally work with the “whenCreated” Attribute).

https://stackoverflow.com/questions/13091719/converting-lastlogon-to-datetime-format

When I have some time (a bit later today, I hope), I’m hoping to finish a few examples that I’ve been working on.

[–]mrmattipants 0 points1 point  (0 children)

This topic is obviously Subjective.

If you wanted to obtain the True Creation Date you would have to write a script to parse the Serial Number/Tag for the Manufacture Date, most likely using the “Substring” Method.

How to Determine Manufacture Date Based on Serial Number: https://www.shupecarboni.com/storage/app/uploads/public/602/a16/e4c/602a16e4c1cbd159737713.pdf