Adding Exchange Attributes to list of contacts
- From: "Marius Wilberg" <MariusWilberg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Jun 2005 05:44:01 -0700
I have created a list of contacts in my AD, and I wonder if there is some
easy way to exchange enable them all - and then add an email address?
The following function will work for adding or changing proxyaddresses to
the contacts, but if the contact has legacyExchangeDN = "" then basically I'm
screwed :)
Any hints or tips would be greatly appreciated
Function ListAllAccounts(strLDAP)
Const ADS_PROPERTY_APPEND = 3
Set objAD = GetObject(strLDAP)
For Each Item In objAD
If Item.Class = "contact" Then
'On Error Resume Next
If Item.legacyExchangeDN <> "" Then
Item.PutEx ADS_PROPERTY_APPEND, "proxyAddresses", "SMTP:" &
Item.givenName & "." & Item.sn & "@company.com"
Item.SetInfo
End If
End If
Next
End Function
.
- Follow-Ups:
- RE: Adding Exchange Attributes to list of contacts
- From: Marius Wilberg
- RE: Adding Exchange Attributes to list of contacts
- Prev by Date: Re: logon scripts
- Next by Date: RE: HTML, VBSCRIPT and Active Directory
- Previous by thread: Web App Using ADSI
- Next by thread: RE: Adding Exchange Attributes to list of contacts
- Index(es):
Relevant Pages
|