[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 537
  • Last Modified:

global address list not updating

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
ajes01
Asked:
ajes01
1 Solution
 
redseatechnologiesCommented:
It will take up to 24 hours for cached mode clients to download the new version of the Offline address book

-red
0
 
robjeevesCommented:
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
 
ajes01Author Commented:
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
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
robjeevesCommented:
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
 
redseatechnologiesCommented:
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
 
Chris DentPowerShell DeveloperCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now