none
get-aduser name -Properties employeeid does not work for all users RRS feed

  • Question

  • I was trying to export all the user information to csv file
    using the command Get-ADUser

    get-aduser -filter * -searchBase 'ou=***,dc=****,dc=***,dc=**-properties  employeeid ,description, name , SamAccountName,Department,Title,Office| Select-Object employeeid ,description, name , SamAccountName,Department,Title,Office|export-csv -NoTypeInformation -encoding unicode -path $env:userprofile\Desktop\user_info.csv

    and when i reviewed the csv file i found that some employee ID returned with empty values
    when i checked the employeeID in the ADUC attribute editor i found that these users do have employeeID

    also i try

    get-aduser  name -properties  employeeid

    the employeeID returned empty

    i don't understand why the employeeID  does not return for all the users

    Wednesday, January 28, 2015 6:36 AM

Answers

  • That should work. Are you sure in ADUC you aren't looking at employeeNumber?

    Richard Mueller - MVP Directory Services

    Wednesday, January 28, 2015 9:13 AM