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

Last Updated on May 31, 2017 by admin

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.

Leave a Comment