-1

How can I find Computers recently joined to Active Directory?

Edit: I've searched google for the title phrase, and have also searched here, but can find nothing specifically about filtering on when the Computer Account was created.

  • 1
    Please include research effort in your post. – Colyn1337 Nov 21 '14 at 15:35
  • We're here to help...but there appears to be little to no research done on this issue up front and/or there's very little for someone here to go on to assist you. It is recommended that you post things you've already tried, options you are considering, or errors that you are experiencing. The more details you provide (logs, screenshots, etc.), the better the experts here can assist you. – TheCleaner Nov 21 '14 at 15:50
  • @korylprince - to help you out...you should have started your question with the links and research you did up front in order to show that effort. The experts here can only go off of what is posted...not what was intended. To keep the question from looking cluttered you can simply add the "research" you did at below your actual question or bold the question/parts that are relevant. I didn't downvote or upvote you, but if you'll edit your original question with relevant research I'll give it an upvote. – TheCleaner Nov 21 '14 at 15:55
  • @korylprince You weren't donwvoted because of the way you asked ... well, I assume not, as I didn't downvote you. I was just being a smartass. That said, the first thing I thought when I saw this was "what a lazy question, I searched Google and got an answer right away." Turns out the answer I got had an error in it, and I knew what to search on, but a simple statement of what you found from searching can ward off a lot of that sentiment, and probably some of the downvotes too. I don't think you'd have any downvotes if you started with what you have now. (Maybe one or two.) – HopelessN00b Nov 21 '14 at 16:03
  • Take this question: serverfault.com/questions/41224/… Objectively, it's more opinion-based, and also contains no research (he could have said how he researched for an answer) - just sayin'... I got my answer and I'm happy so I'll get off my high horse now. Thanks guys :) – korylprince Nov 21 '14 at 16:16
11

All computer accounts that were created as of December 1, 2011 (12/01/2011) in the Active Directory:

Get-ADComputer -LDAPFilter "(&(objectCategory=computer)(whenCreated>=20111201000000.0Z))" -Properties whenCreated | Format-Table Name,whenCreated,distinguishedName -Autosize -Wrap

PowerShell, of course. Edit date to line up with your definition of "recent," and formatting to line up with your tastes or reporting needs.


And since that page/site had at least one error that someone else caught, I'm gonna not trust it at all. Here's some PowerShell I personally dashed off, which actually works as it's supposed to, without needing Ryan to fix it first. As above, adjust "recently" and formatting to meet your needs, of course.

$recently = [DateTime]::Today.AddDays(-30)
Get-ADComputer -Filter 'WhenCreated -ge $recently' -Properties whenCreated | Format-Table Name,whenCreated,distinguishedName -Autosize -Wrap

When run at work, in lieu of doing whatever boring work my boss has assigned me, I get the below output, for reference.

enter image description here

| improve this answer | |
  • That's exactly what I wanted. – korylprince Nov 21 '14 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.