Here is a simple PowerShell script which you can use to add Employee ID in a user object. This script requires PowerShell Active Directory module.
Note: I am not searching AD for the user account. My assumption is the user account already exist in AD.
Input file – Input file (Users.csv) contains user names and employeeID in the following format:
You can download this script from the following locations:
www.sivarajan.com - http://www.sivarajan.com/scripts/Add_EMpID.txt
Microsoft TechNet Gallery - http://gallery.technet.microsoft.com/scriptcenter/e9bafc1a-b5b1-4663-8e25-b0d0ea28c2b2
Script #2 - Search AD using email address and update the employee ID value.
Input file (users.csv) contains email address and employee ID in the following format:
Microsoft TechNet Gallery - http://gallery.technet.microsoft.com/scriptcenter/87a2a2f3-f590-4bdf-911b-da4df53f1f11