bfpnaeechange
asked on
Country/Region is not visible in Global Address List but does appear in ADUC
Hi all. I use the following code successfully to create users in the Users container along with a mailbox. The country is populated by querying sql, then doing an IF statement, then setting the attribute.
My problem is that when I use this vbscript code to create a contact, the Country/Region field is blank. I can go back into the GUI of ADUC and change to a different country and then apply....then change back to the original country and it then shows up in the GAL.
This issue also happens when creating users. This happens in the Users container as well as the Contacts OU.
Any ideas? I am running Exchange 2003.
strCountry is the value pulled from my SQL query.
vCountry = "USA"
vCountryCa = "Canada"
if strCountry = vCountry then sCountry = "US"
if strCountry = vCountryCa then sCountry = "CA"
if sCountry <> "" then
oContact.put"c", sCountry
end if
The country/region shows up in ADUC.
My problem is that when I use this vbscript code to create a contact, the Country/Region field is blank. I can go back into the GUI of ADUC and change to a different country and then apply....then change back to the original country and it then shows up in the GAL.
This issue also happens when creating users. This happens in the Users container as well as the Contacts OU.
Any ideas? I am running Exchange 2003.
strCountry is the value pulled from my SQL query.
vCountry = "USA"
vCountryCa = "Canada"
if strCountry = vCountry then sCountry = "US"
if strCountry = vCountryCa then sCountry = "CA"
if sCountry <> "" then
oContact.put"c", sCountry
end if
The country/region shows up in ADUC.
Do you have a "oContact.SetInfo" line anywhere? Maybe try adding it to your IF block, as per the following
if sCountry <> "" then
oContact.put"c", sCountry
oContact.SetInfo
end if
if sCountry <> "" then
oContact.put"c", sCountry
oContact.SetInfo
end if
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Justin