5.28. Setting Properties on User Accounts

Problem

You need to change properties on user accounts.

Solution

Using a graphical user interface

  1. Log on to any machine in your domain that has the Exchange management tools installed.

  2. Open the ADUC snap-in (Users and Computers.msc).

  3. Locate the container that holds the user object whose properties you want to modify.

  4. Select the user object you want to modify, then right-click it and choose Properties.

  5. Select the General tab in the Properties dialog box.

  6. Edit properties as desired.

  7. Select other pages in the tabbed dialog box, and edit other properties.

  8. Click OK to close the Properties dialog box.

Using VBScript

' This code fills the target user account with a bunch of silly
' properties, primarily to illustrate how to set multivalued properties
' ------ SCRIPT CONFIGURATION ------ 
strUser = "<UserDN>" 'e.g., "cn=jimmy,cn=Users,dc=domain,dc=com" set objUser = GetObject("LDAP://" & strUser) ' ------ END CONFIGURATION --------- givenName="James" 'First (given) Name initials="F" 'Initial(s) sn="Jones" 'Last Name displayName="James F Jones" 'Display Name description="New accounting intern" physicalDeliveryOfficeName="Finance & Accounting" ' Office telephoneNumber="512-555-0000" WWWHomePage="http://wwww.domain.com/accounting" ' ------ ADU&C ADDRESS TAB --------- streetAddress="123 Main Street" & vbCRLF & "AcmeCo Towers" & vbCRLF & "Suite 700B" 'Street postOfficeBox="PO BOX 1234" l="Anytown" 'city st="CA" 'state postalCode="94111" 'Zip/Postal Code co="United ...

Get Exchange Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.