When you have only employee ID as input in CSV. lets see how to export the appropriate Active directory accounts to a csv file with employeeID,displayName,givenName,sn,sAMAccountName, mail, Department. You can always modify the scripts to get desired output.
Import-csv c:\employeeids.csv | ForEach-Object { $ID = $_.employeeID get-aduser -filter {employeeid -eq $ID} -Properties * | select-object employeeID,displayName,givenName,sn,sAMAccountName, mail, Department | Export-csv empo.csv -Append }
Save as ps1 and update the CSV file location.