[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

AD attribute in user account question

Posted on 2014-07-15
4
Medium Priority
?
484 Views
Last Modified: 2014-07-25
I have 2 questions

1.) We want to use the employeeID attribute in AD but you only see that when you look at the attribute editor. Is it possible to have it show up on the general tab?

2.) we need to import from excel an 4 digit + first character of first name to the employeeID AD attribute. I found a way to do part of this via powershell.

Import-CSV "C:\Scripts\Users.csv" |
  ForEach-Object{
     $user=([adsisearcher]"samaccountName=$($_.UserName)").FindOne().GetDirectoryENtry()
     $user.EmployeeID=$_.EmployeeID
     $User.CommitChanges()
}

But that does not take the first character of the first name and add it to the 4 digit code found in the cvs file. Is there a way to do that via powershell or do I have to do a vbscript?
0
Comment
Question by:iamuser
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Ben Hart
ID: 40197946
We also make sure of that specific attribute for the past 5 years but have still not found a way to see it easily.  You could obviously code something as an ADUC replacement but that's about it AFAIK.
0
 

Author Comment

by:iamuser
ID: 40197961
But is the field still usable if it's populated? My concern is whether another AD aware software can see the data in that attribute.
0
 
LVL 18

Accepted Solution

by:
Learnctx earned 2000 total points
ID: 40207018
I have never had a need to do it before, but this article suggests they have a guide on making the attribute employeeID attribute available in ADUC: http://www.kreslavsky.com/2008/11/add-custom-field-to-aduc-employee-id.html.

If you want to replace the employee ID as the first letter of their given name with the number in the CSV then just do the following.

$user.EmployeeID=$user.givenName + $_.EmployeeID

Open in new window

This should do the trick.

Any software which can query AD should have no problems reading the employeeID attribute though. If it does...use other software because that is just terrible.
0
 

Author Closing Comment

by:iamuser
ID: 40220426
Great thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here's a look at newsworthy articles and community happenings during the last month.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Screencast - Getting to Know the Pipeline

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question