Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Multivalued Attribute in Exchange
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 20th April 19:40
ray mcdaniele¬Œp6§‰é]ŠÇ.²È¨žÉ¢rº,¡û\¢
External User
 
Posts: 1
Default Multivalued Attribute in Exchange



I am trying to create a script that will create Contacts in my Exchange
organization. I want to set message restrictions to accept messages "Only
from:". I have two groups I want to add to this attribute. The problem is
only the second one gets added:

objuser.put "dLMemSubmitPerms","cn=this group,ou=distribution
groups,dc=anydomain,dc=com"
objuser.putex ADS_PROPERTY_APPEND, "dLMemSubmitPerms", Array("cn=that
group,ou=distribution groups,dc=anydomain,dc=com")
objuser.put "m***chHideFromAddressLists", TRUE
objuser.SetInfo

I have tried the ADS_PROPERTY_APPEND on both lines with the same results. I
have tried without using the putex for the second attribute. Same
result...only the second value gets added. Any help would be appreciated.

Thanks,
Ray
  Reply With Quote


  sponsored links


2 20th April 19:40
glen scales [mvp]
External User
 
Posts: 1
Default Multivalued Attribute in Exchange



You need to use Putex as Put will always overwrite the current property and
will only allow you to enter 1 value in a multivalued attribute. The
following bit of code works okay for me for entering multiple values.

uName = "GroupDN"
qsting = "LDAP://" & uName
set objGroup = GetObject(qsting)
objGroup.Putex 3, "dLMemSubmitPerms", array("Group1DN","Group2DN")
objGroup.setinfo

Cheers
Glen
  Reply With Quote
3 20th April 19:40
ray maczÈÆœv+ºË¢{&‰Ê貇ír‰
External User
 
Posts: 1
Default Multivalued Attribute in Exchange


Same problem....here is my sub. This time only the first group is added.

Sub ImportUsers(oCont)
while not InPutFile.atEndOfStream
uname = InPutFile.ReadLine()
arrname = Split (uname,",")
lname = arrname(0)
fname = arrname(1)
mail = arrname(2)
nick = Left(mail,(instr(1, mail, "@") - 1))
ucn = lname & "\, " & fname
Set objUser = oContainer.Create("contact", "cn=" & ucn )
objuser.put "mail", mail
objuser.put "givenName", fname
objuser.put "sn", lname
objuser.put "DisplayName", lname & ", " & fname
objuser.put "name", lname & ", " & fname
objuser.put "mailNickname", nick
objuser.put "proxyAddresses", "SMTP:" & mail
objuser.put "targetAddress", "SMTP:" & mail
objuser.putex 3, "dLMemSubmitPerms", Array("cn=group1,ou=groups,ou=more
groups,dc=anydomain,dc=com","cn=group2,ou=groups,o u=more
groups,dc=anydomain,dc=com")
objuser.put "m***chHideFromAddressLists", TRUE
objuser.SetInfo
Wend
End Sub
  Reply With Quote
4 20th April 19:40
glen scales [mvp]
External User
 
Posts: 1
Default Multivalued Attribute in Exchange


Is it just one particular group that you can't add ? Where are you running
the code from a Workstation or the DC, what account are you running the
script under.

You code looks okay, what you could try is create an array and load the
values into that and then pass it into the putex statment

dim addarry(1)
addarry(0) = "cn=group1,ou=groups,ou=more groups,dc=anydomain,dc=com"
addarry(1) = "cn=group1,ou=groups,ou=more groups,dc=anydomain,dc=com"
objUser.Putex 3, "dLMemSubmitPerms", addarry

The other thing maybe to try is just adding them one at time and call
setinfo to see if that works

Cheers
Glen
  Reply With Quote
5 30th April 05:25
ray maczÈÆœv+ºË¢{&‰Ê貇ír‰
External User
 
Posts: 1
Default Multivalued Attribute in Exchange


Not sure on that...I am trying to add two particular groups and I can add
either or.

I have tried both from my workstation, logged in as a domain admin and
exchange admin and from a domain controller logged in as the domain
adminstrator.

I will try both recommendations.

Thanks,
Ray
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666