Hi chaps,

 

I have a script which I have been using to easily add contacts and have
them added to a group on the sbs box here. However, I've just realised
that contacts added to the server using this script never show up in
Outlooks Address Book. Closer hunting showed that they don't show up
when checking the results of the GAL or the All Contacts group in
exchange.

 

This is the script. Is there anything that I have missed to get the
contacts added to the GAL ?

****************************************************

dim u

dim e

dim d

dim UsrReturn

 

u=inputbox("Enter Name of Contact","Information","Name")

e=inputbox("Enter Email of contact","Information","Email")

d=inputbox("Enter optional description of
contact","Information","Description")

 

Set objOU =
GetObject("LDAP://OU=Contacts,OU=MyBusiness,dc=MyClient,dc=local")

 

'Get the Group Object

Set objGroup = GetObject("LDAP://cn=DISTi,OU=Distribution
Groups,OU=MyBusiness,dc=MyClient,dc=local") 

If Err <> 0 Then 

msbox "Error " & Hex(Err)

End If 

Err.Clear

 

'Create the Contact Object

Set objUser = objOU.Create("contact", "cn=" & u)

 

If Err <> 0 Then 

msgbox "Error " & Hex(Err)

End If 

Err.Clear

 

'Set the additional info

if e<>"" then

                objUser.put "Mail",e 

else

                msgbox "Email Blank"

 

end if

objUser.Put "Description",d

objUser.SetInfo

 

usrReturn=msgbox("Would you like " & n & " added to the DISTi list?",
VBYesNo + VBQuestion)

 

if usrReturn = vbYES then

  'Set the Group Membership

  objGroup.Add(objUser.AdsPath)

  objGroup.SetInfo

end if

****************************************************

 

Olly


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to