Solved

global address list not updating

Posted on 2006-11-08
8
484 Views
Last Modified: 2012-05-05
I've been using a vbscript to bulk load mail enabled contacts into ad.  The scripts pulls contact data from an excel file.  I've used the script and source file on other networks and have not had a problem with it in the past.  The mail enabled contacts are not appearing in the GAL when using Outlook clients.  The contacts do appear in the GAL when using OWA.

After I load the contacts I force replication, update and rebuild rus and then rebuild the offline address list.  The contacts are still no-shows in the Outlook GAL.

Windows 2003 sp1
Exchange 2003 sp2
Outlook 2003
0
Comment
Question by:ajes01
8 Comments
 
LVL 39

Expert Comment

by:redseatechnologies
ID: 17904040
It will take up to 24 hours for cached mode clients to download the new version of the Offline address book

-red
0
 
LVL 9

Expert Comment

by:robjeeves
ID: 17905014
If you want to see the new list quicker in cached mode outlook you should be able to 'Download Address Book' from the send and receive menu manually.

Rob
0
 

Author Comment

by:ajes01
ID: 17909212
Thanks for the replies.  It has been longer than 24 hours and the 'Download Address Book' is having no affect.  If I manually create the mail enabled contacts then they appear as expected.  When I use my script they only appear in the OWA GAL.  How does the owa gal differ from the standard outlook gal?  I've included the script below.


Option Explicit
Dim objContainer, objContact, objExcel, objSheet
Dim strOU, strContactName, strPathExcel, strEmail, strProxy
Dim strTelephone, strMobile, strFax, strHome, strCompany
Dim strStreet, strPO, strCity, strState, strZip, strCountry
Dim strNotes
Dim intRow, strDescription, strFirst, strLast, strMainDefault
Dim strMailbox, strNick
Dim strEval

' Set string variables
strPathExcel = "C:\Temp\contacts.xls"
intRow = 5

' Section to bind to Active Directory
Set objContainer = GetObject("LDAP://OU=Contacts,DC=hq,DC=kittycatshakedown,DC=com")

' Open the Excel spreadsheet
Set objExcel = CreateObject("Excel.Application")
Set objSheet = objExcel.Workbooks.Open(strPathExcel)

' cycle through the cells
Do Until (objExcel.Cells(intRow,1).Value) = ""
strContactName = objExcel.Cells(intRow, 1).Value
strEmail = objExcel.cells(intRow, 2).Value
strFirst = objExcel.cells(intRow, 3).Value
strLast = objExcel.cells(intRow, 4).Value
strTelephone = objExcel.cells(intRow, 5).Value
strMobile = objExcel.cells(intRow, 6).Value
strFax = objExcel.cells(intRow, 7).Value
strHome = objExcel.cells(intRow, 8).Value
strCompany = objExcel.cells(intRow, 9).Value
strDescription= objExcel.cells(intRow, 10).Value
strStreet= objExcel.cells(intRow, 11).Value
strPO= objExcel.cells(intRow, 12).Value
strCity = objExcel.cells(intRow, 13).Value
strState = objExcel.cells(intRow, 14).Value
strZip = objExcel.cells(intRow, 15).Value
strCountry = objExcel.cells(intRow, 16).Value
strNotes = objExcel.cells(intRow, 17).Value
'strMainDefault = objExcel.cells(intRow, 6).Value
'strMailbox = objExcel.cells(intRow, 10).Value
strNick =strContactName


' Build the contact.
Set objContact = objContainer.Create("Contact",_
"cn=" & strContactName)
objContact.Put "mailNickname", strNick
objContact.Put "DisplayName", strContactName & " (Webster)"
objContact.Put "mail", strEmail
objContact.Put "givenName", strFirst
objContact.Put "sn", strLast

strEval = Len(strDescription)
If strEval <> 0 Then
      objContact.Put "description", strDescription
End If

strEval = Len(strTelephone)
If strEval <> 0 Then
      objContact.Put "telephoneNumber", strTelephone
End If

strEval = Len(strMobile)
If strEval <> 0 Then
      objContact.Put "mobile", strMobile
End If

strEval = Len(strFax)
If strEval <> 0 Then
      objContact.Put "facsimileTelephoneNumber", strFax
End If

strEval = Len(strHome)
If strEval <> 0 Then
      objContact.Put "homePhone", strHome
End If

strEval = Len(strCompany)
If strEval <> 0 Then
      objContact.Put "company", strCompany
End If

strEval = Len(strStreet)
If strEval <> 0 Then
      objContact.Put "streetAddress", strStreet
End If

strEval = Len(strPO)
If strEval <> 0 Then
      objContact.Put "postOfficeBox", strPO
End If

strEval = Len(strCity)
If strEval <> 0 Then
      objContact.Put "l", strCity
End If

strEval = Len(strState)
If strEval <> 0 Then
      objContact.Put "st", strState
End If

strEval = Len(strZip)
If strEval <> 0 Then
      objContact.Put "postalCode", strZip
End If

strEval = Len(strCountry)
If strEval <> 0 Then
      objContact.Put "c", strCountry
End If

strEval = Len(strNotes)
If strEval <> 0 Then
      objContact.Put "info", strNotes
End If

objContact.Put "proxyAddresses", "smtp:" & strEmail
objContact.Put "targetAddress", "SMTP:" & strEmail
objContact.SetInfo

intRow = intRow + 1
Loop
objExcel.Quit
WScript.Quit  
0
Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

 
LVL 9

Expert Comment

by:robjeeves
ID: 17911940
G'day mate

Afraid I'm stuck then.  If they appear in OWA and manual creations appear on O/L GAL I can't begin to wonder what the problem is, except something strange with the script but I am no programmer . . . Any ideas red?

Sorry buddy

Rob
0
 
LVL 39

Expert Comment

by:redseatechnologies
ID: 17912241
Either the outlook clients are looking at a different GAL, or the script is doing something incorrectly.

I will try to attract a scripter for you

-red
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 50 total points
ID: 17912801
Hey guys,

Red yelled and I think I see why it's not working so well.

You're not really mail enabling the contact as I would have expected and it's unlikely to be ending up with a full set of attributes. There are a number of ways to do it, possibly the most efficient is to call the MailEnable method to replace these lines:

objContact.Put "proxyAddresses", "smtp:" & strEmail
objContact.Put "targetAddress", "SMTP:" & strEmail
objContact.SetInfo

With:

objContact.MailEnable strEmail

I don't think you need a SetInfo after that one as it's a method call rather than changing a property.

Most of the examples I have of this also set the Internet Encoding attribute like this:

objContact.Put "internetEncoding", 1310720
objContact.SetInfo

Which may or may not be necessary, I'll try it out later on.

HTH

Chris
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now