Thanks Chris,
As you used the SetInfo() method I thought I would try it even though it isn't listed in the member properties of the object??
Anyway - my method now works a treat.
Cheers, Neil
"Clint Bergman" <clint[ at ]psd267.wednet.edu> wrote in message news:%23DkRO9WxHHA.3784[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > Here's a version of how I have successfully added a member to a group. I > just installed the Quest AD cmdlets yesterday and am looking at how we > might use those to accomplish the task..... > > $ADS_PROPERTY_APPEND = 3 > > $user = [ADSI]"LDAP://<PATH_TO_USER>" > $group = [ADSI]"LDAP://<PATH_TO_GROUP>" > $group.putEx($ADS_PROPERTY_APPEND,"member",[ at ]($user.distinguishedname)) > $group.setInfo() > > > "Neil Chambers" <n3llyb0y[ at ]aol.com> wrote in message > news:uYNli.26447$ew4.7230[ at ]fe03.news.easynews.com... >> I'm trying to commit changes to group membership but nothing seems to >> happen >> >> >> #>[adsi]$grp = get-adobject -class Group -filter "(name=myGrp)" >> #>[adsi]$usr = get-adobject -class User -filter "(name=myUser)" >> #>$grp.member.add([string]$usr.distinguishedname) >> ## - $grp.member will show the dn of the user is showing at this point >> ## - now I try to save the changes - I can't find a SetInfo() method but >> I can find this in the PSBase: >> #>$grp.PSBase.CommitChanges() >> >> nadda >> >> What gives? >> >> Cheers :-) >> Neil > >
|