Discussion:
Displaying employee iD on the properties page of a user
(too old to reply)
Trever
2004-02-26 18:04:29 UTC
Permalink
How do I display the Employee ID on the properties page of
a user within Users and Computers?

I am able to set and read the employee id field through
VB. However I would like to display (and modify if
neccessary) the Employee Id field for a User on the
properies page.

Thank-you.
Brian Desmond [MVP]
2004-02-26 22:17:44 UTC
Permalink
You could create a custom add-in for AD Users & Comps, but beyond that it's
not accesible from the GUI interface.
--
--
Brian Desmond
Windows Server MVP
***@payton.cps.k12.il.us

Http://www.briandesmond.com
Post by Trever
How do I display the Employee ID on the properties page of
a user within Users and Computers?
I am able to set and read the employee id field through
VB. However I would like to display (and modify if
neccessary) the Employee Id field for a User on the
properies page.
Thank-you.
Ulf B. Simon-Weidner [MVP]
2004-02-26 22:32:04 UTC
Permalink
Trever says...
Post by Trever
How do I display the Employee ID on the properties page of
a user within Users and Computers?
I am able to set and read the employee id field through
VB. However I would like to display (and modify if
neccessary) the Employee Id field for a User on the
properies page.
Thank-you.
Hello Trever,

you can only do this by writing a own property page. See the following thread
for details:
http://groups.google.com/groups?&selm=***@TK2MSFTNGP10.phx.gbl

But you'd be able to write some selfmade application (e.g. VBS, ASP or HTA, or
an exe) for the additional properties you'd like to view and change. You can
even extend the context-menu of Active Directory users and computers to start
your application if you want so. Since this is not your initial question post
back here if you decide to go that way and if you need further details.

Gruesse - Sincerely,

Ulf B. Simon-Weidner
Trever
2004-02-27 19:55:05 UTC
Permalink
Thank-you Ulf. I am able to view the Employee Id field
through the Organizational Unit display. Now I need a
way to modify this field.

I found a document that describes how to build such an
Application (see following). I am able to complete step
2, to get the EmployeeId to be part of the Optional
attributes.... In step 3 where I am to edit the
EmployeeId attribute, the employee attribute is not
available (not there) to edit. I am doing this with an
account which is a member of the Schema Admins and
enterprise admins.


===============
The employee ID and employee number fields are already in
Active Directory (AD). However, you need to tie them to a
particular class. First, you must install the Windows 2000
Support Tools from the Win2K CD-ROM (Support/Tools), then
perform the following steps:
1. Install the Schema snap-in (Start, Run, regsvr32
schmmgmt.msc).
2. To add the employeeID and employeeNumber
attributes to the person class, open the Schema console
and navigate to Classes, Person. Right-click Person and
select Properties. Select Attributes, click Add, then
locate and click employeeID. Click OK. Click Add again.
Locate and click employeeNumber, then click OK twice to
close both dialog boxes.
3. Open the Active Directory Service Interfaces
(ADSI) Edit utility, then navigate to Configuration
Container, CN=Configuration, CN=DisplaySpecifiers, CN=409.
4. In the right-pane, locate and right-click CN=user-
display, and select Properties.
5. In the Edit Attribute box, type the following:
,&Employee ID, eid.vbs

then click Add, and type the following:
,&Employee Number, enum.vbs

6. These steps configure the options Employee ID and
Employee Number on the context menu for a user in the
Microsoft Management Console (MMC) Active Directory Users
and Computers snap-in.
7. You must write and place the following scripts on
your C drive or somewhere else in your file path:
--------
eid.vbs
--------

Dim oVar
Dim oUsr
Dim tmp
Set oVar = Wscript.Arguments
Set oUsr = GetObject(oVar(0))
tmp = InputBox("The Employee ID of the user is: " &
oUsr.employeeID &
vbCRLF & vbCRLF & "If you would like enter a new number or
modify the
existing number, enter the new number in the textbox
below")
if tmp <> "" then oUsr.Put "employeeID",tmp
oUsr.SetInfo
Set oUsr = Nothing
WScript.Quit

---------
enum.vbs
---------

Dim oVar
Dim oUsr
Dim tmp
Set oVar = Wscript.Arguments
Set oUsr = GetObject(oVar(0))
tmp = InputBox("The Employee Number for this user is: " &
oUsr.EmployeeNumber & vbCRLF & vbCRLF & "If you would like
enter a new
number or modify the existing number, enter the new number
in the
textbox below")
if tmp <> "" then oUsr.Put "employeeNumber",tmp
oUsr.SetInfo
Set oUsr = Nothing
WScript.Quit
=============================
-----Original Message-----
Trever says...
Post by Trever
How do I display the Employee ID on the properties page
of
Post by Trever
a user within Users and Computers?
I am able to set and read the employee id field through
VB. However I would like to display (and modify if
neccessary) the Employee Id field for a User on the
properies page.
Thank-you.
Hello Trever,
you can only do this by writing a own property page. See
the following thread
http://groups.google.com/groups?
But you'd be able to write some selfmade application
(e.g. VBS, ASP or HTA, or
an exe) for the additional properties you'd like to view
and change. You can
even extend the context-menu of Active Directory users
and computers to start
your application if you want so. Since this is not your
initial question post
back here if you decide to go that way and if you need
further details.
Gruesse - Sincerely,
Ulf B. Simon-Weidner
.
Ulf B. Simon-Weidner [MVP]
2004-02-28 16:15:07 UTC
Permalink
Trever says...
Post by Trever
Thank-you Ulf. I am able to view the Employee Id field
through the Organizational Unit display. Now I need a
way to modify this field.
I found a document that describes how to build such an
Application (see following). I am able to complete step
2, to get the EmployeeId to be part of the Optional
attributes.... In step 3 where I am to edit the
EmployeeId attribute, the employee attribute is not
available (not there) to edit. I am doing this with an
account which is a member of the Schema Admins and
enterprise admins.
[...]
Post by Trever
3. Open the Active Directory Service Interfaces
(ADSI) Edit utility, then navigate to Configuration
Container, CN=Configuration, CN=DisplaySpecifiers, CN=409.
4. In the right-pane, locate and right-click CN=user-
display, and select Properties.
,&Employee ID, eid.vbs
,&Employee Number, enum.vbs
Hello Trevor,

you are not supposed to edit the employee attribute, you are supposed to edit
the object cn=user-display,cn=409,cn=DisplaySpecifiers,cn=configuration,dc=...
object with ADSIEdit.msc. You have to change the attribute adminContextMenu
(this part is missed in your description above).

If you have administrators with a console which is not english you will have to
do this in the other language display specifiers as well (cn=409 is english).

Gruesse - Sincerely,

Ulf B. Simon-Weidner
Trever
2004-03-01 20:26:05 UTC
Permalink
I found a couple of other references to this same example and none of the indicated that it was the attributes of 'adminContextMenu' that were to be modified. The menu option now works. Thank-you Ulf

Have a great day

Trever Denni
Meyers Norris Penny LL
Chartered Accountant
Ulf B. Simon-Weidner [MVP]
2004-03-01 23:16:22 UTC
Permalink
=?Utf-8?B?VHJldmVy?= says...
I found a couple of other references to this same example and none of the indicated that it was the attributes of 'adminContextMenu' that were to be modified. The menu option now works. Thank-you Ulf!
Have a great day!
Trever Dennis
Meyers Norris Penny LLP
Chartered Accountants
Hello Trever,

you are welcome - I'm glad it helped!

Gruesse - Sincerely,

Ulf B. Simon-Weidner

Continue reading on narkive:
Loading...