Link to home
Start Free TrialLog in
Avatar of Mike
MikeFlag for United States of America

asked on

Need to get a list of users From AD

Greeting Experts -  I am in need of some help creating a script that can pull a full list of users (including First name, Last Name, email address, and date created) for the past 30 days from Active Directory. Does somebody out there have script or create a script that can Scan AD and pull down those users that have been added with in the last 30 days.....
Avatar of bbao
bbao
Flag of Australia image

ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I use a software product from http://www.cjwdev.com/Software/ADReportingTool/Info.html

The free version worked fine for my needs.  Select the fields needed, export to spreadsheet if desired.
It's a fairly simple command.
$date = (Get-Date).AddDays(-30)
Get-ADUser -Filter {WhenCreated -gt $date} -Properties GivenName,SurName,Mail,WhenCreated | Select GivenName,SurName,Mail,WhenCreated

Open in new window

The script as posted in https:#a41618699 does exactly as asked for.

The other suggestions are likely viable alternatives (I'm not in a position to evaluate), but the aforementioned post directly answers the question as asked.
Avatar of Mike

ASKER

I've requested that this question be deleted for the following reason:

Done
See my previous comment for objection.
Avatar of Mike

ASKER

done
question be closed? you have at least three valid answers
Avatar of Mike

ASKER

Thanks for the help
Avatar of Bill Prew
Bill Prew

Welcome.

~bp