Adding new users, updating and removing existing users is a day to day task of system engineers. At the end of the day, you or an IT manager may need to find out which new users have been added in the active directory for security or auditing purposes.

The PowerShell script written in this article can help you to identify new users added in active directory in last 24 hours.

Find Newly Added Users in AD Using PowerShell

Step 1. Open the notepad editor and paste the following script in a file. Save the file with .ps1 extension

$When = ((Get-Date).AddDays(-1))
Get-ADUser -filter {(whencreated -ge $When)}

Step 2. Open PowerShell with elevated privileges and execute the above script file.

How to Find Newly Added Users in AD in Last 24 Hours Using PowerShell

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.

Leave a Reply

Your email address will not be published. Required fields are marked *