Link to home
Start Free TrialLog in
Avatar of GCTTechs
GCTTechsFlag for United States of America

asked on

Get-ADUser - Account created by?

Hey guys, trying to run the following PS to get a list of user accounts created in the past 30 days.

Question, is there a way to pull the account/user that created the new account?

Import-Module ActiveDirectory
$date = get-date
Get-ADUser -Filter * -Properties whenCreated | Where-Object {$_.whenCreated -ge ((Get-Date).AddDays(-30)).Date} | Select GivenName, Surname, Name, UserPrincipalName, SamAccountName, whenCreated, Enabled | Export-Csv C:\Scripts\Reports\ADUsersCreatedLast30Days.csv
Avatar of becraig
becraig
Flag of United States of America image

There is a great tool you can use to find out this information if you already have the required level of auditing turned on.
http://www.netwrix.com/active_directory_auditing.html

If you have not been auditing user creation etc that information might be lost to you.
SOLUTION
Avatar of Premkumar Yogeswaran
Premkumar Yogeswaran
Flag of India image

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
ASKER CERTIFIED SOLUTION
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