I need help in getting this command to export the data into a CSV.
Get-ADUser -Filter * -Properties whenCreated | Where-Object {$_.whenCreated -ge ((Get-Date).AddDays(-30)).Date} | FL SamAccountName, Name, DistinguishedName, whenCreated | Export-Csv c:\scripts\ADCreatedUsers.csv
When doing this the command does not give me anything close to what I expect.