get-aduser - Export-CSV -- POWERSHELL RRS feed

  • Question

  • 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.

    Thursday, January 15, 2015 6:35 PM


All replies