We help IT Professionals succeed at work.

Power Shell command required to find active directory users

Hi,

I need a Power Shell command to retrieve a list of Active Directory Users whose accounts were created in 2012.


Thank you

Adam
Comment
Watch Question

Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
Get-ADUser -Filter * -Properties whenCreated | ? {$_.whenCreated.Year -eq 2012}

Open in new window

Mahmoud SabrySenior IT Systems Engineer

Commented:
you can use command prompt also
dsquery * dc=example,dc=net -filter "(&(objectCategory=Person)(objectClass=User)(whenCreated>=20061001000000.0Z))"

where 20061001000000 = date (2006 - month 10 - day 01 --time ....etc)

Author

Commented:
Thank you