Changing the Address in AD 
Author Message
 Changing the Address in AD

I need to know the best way to change the Address in an OU without having to
do this manually, anyone know of a way to do this.

Thanks
Gavin...



Mon, 28 Nov 2005 23:59:22 GMT  
 Changing the Address in AD

Quote:

> I need to know the best way to change the Address in an OU without having
to
> do this manually, anyone know of a way to do this.

Hi,

Many of the attributes available for user objects are available for OU
objects. The common address attributes are:

                 LDAP attribute   Available     Available
Description      Name             for Users     for OU's
-----------      --------------   ---------     ---------
Street           streetAddress    yes           no
Street           street           yes           yes
P.O.Box          postOfficeBox    yes           yes
City             l                yes           yes
State            st               yes           yes
Zip              postalCode       yes           yes

Bind to the OU object and set the attributes desired:

Set objOU = GetObject("LDAP://ou=Sales,dc=MyDomain,dc=com")
objOU.street = "123 Main St."
objOU.l = "Dover"
objOU.st = "Delaware"
objOU.description = "Sales Department OU"
objOU.SetInfo

To set the country to "US", you would set 3 attributes, as follows:

objOU.c = "US"
objOU.Co = "UNITED STATES"
objOU.CountryCode = 840

--
Richard
Microsoft MVP Scripting and ADSI
http://www.rlmueller.net
--



Tue, 29 Nov 2005 00:16:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Script for adding address info into multiple users in AD

2. Code to change Address Book Default Address book view

3. change the cn or name ldap field for an AD user account

4. Password changing in NT4 and AD

5. Changing All Users Profile Path in AD or OU

6. Using WSH to change AD Settings?

7. INFO: www address change of mdwconsulting

8. Changing address bar icon?

9. Accessing/Changing a PAB address book

10. Changing IP Address on Network Card

11. Changing NIC MAC address programatically

12. VBScript Sample Change WINS Address

 

 
Powered by phpBB® Forum Software