GCTTechs
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\ADUsers CreatedLas t30Days.cs v
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)).
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.netwrix.com/active_directory_auditing.html
If you have not been auditing user creation etc that information might be lost to you.