Solved

global address list not updating

Posted on 2006-11-08
8
516 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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.

 
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 71

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exchnage ./. Sophos Web Application Firewall 5 23
Combining Get-Mailbox and Get-MailboxStatistics in PowerShell 3 51
Remote Powershell Issue 3 32
Fraud Email 22 83
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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