Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » This may work...
This may work... [message #159885] Tue, 11 August 2009 07:43 Go to next message
DW  is currently offline DW  United States
Messages: 3
Registered: August 2009
Junior Member
Haven't tried this yet but from MSDN looks like .NET may allow us to
do this:

The following Visual Basic .NET example demonstrates how to add
multiple members to a group.

Visual Basic Copy Code ' Bind to the group.
Dim group As New DirectoryEntry(groupDN)

' To add multiple users to a group, use the AddRange method.
group.Properties("member").AddRange(New String() {userDN1, userDN2})

' Commit the changes to the group.
group.CommitChanges()

http://msdn.microsoft.com/en-us/library/ms180904.aspx
Re: This may work... [message #159887 is a reply to message #159885] Tue, 11 August 2009 09:01 Go to previous messageGo to next message
meiweb(nospam)  is currently offline meiweb(nospam)  Germany
Messages: 1307
Registered: July 2009
Senior Member
Hello DW,

May work for what? your posting "Adding Multiple Users to an AD Group at
One Time" from 5:32 11.8.09?

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm


> Haven't tried this yet but from MSDN looks like .NET may allow us to
> do this:
>
> The following Visual Basic .NET example demonstrates how to add
> multiple members to a group.
>
> Visual Basic Copy Code ' Bind to the group.
> Dim group As New DirectoryEntry(groupDN)
> ' To add multiple users to a group, use the AddRange method.
> group.Properties("member").AddRange(New String() {userDN1, userDN2})
>
> ' Commit the changes to the group.
> group.CommitChanges()
> http://msdn.microsoft.com/en-us/library/ms180904.aspx
>
Re: This may work... [message #159888 is a reply to message #159887] Tue, 11 August 2009 09:27 Go to previous messageGo to next message
DW  is currently offline DW  United States
Messages: 3
Registered: August 2009
Junior Member
On Aug 11, 11:01 am, Meinolf Weber [MVP-DS] <meiweb(nospam)@gmx.de>
wrote:
> Hello DW,
>
> May work for what? your posting "Adding Multiple Users to an AD Group at
> One Time" from 5:32 11.8.09?
>
> Best regards
>
> Meinolf Weber
> Disclaimer: This posting is provided "AS IS" with no warranties, and confers
> no rights.
> ** Please do NOT email, only reply to Newsgroups
> ** HELP us help YOU!!!http://www.blakjak.demon.co.uk/mul_crss.htm
>
>
>
> > Haven't tried this yet but from MSDN looks like .NET may allow us to
> > do this:
>
> > The following Visual Basic .NET example demonstrates how to add
> > multiple members to a group.
>
> > Visual Basic Copy Code ' Bind to the group.
> > Dim group As New DirectoryEntry(groupDN)
> > ' To add multiple users to a group, use the AddRange method.
> > group.Properties("member").AddRange(New String() {userDN1, userDN2})
>
> > ' Commit the changes to the group.
> > group.CommitChanges()
> >http://msdn.microsoft.com/en-us/library/ms180904.aspx- Hide quoted text -
>
> - Show quoted text -

Yes, I am sorry I didnt post in the correct thread.
Re: This may work... [message #159903 is a reply to message #159888] Tue, 11 August 2009 20:46 Go to previous message
Joe Kaplan  is currently offline Joe Kaplan  United States
Messages: 88
Registered: July 2009
Member
You can also call Add multiple times if needed. You can also use the group
management features in SDS.AccountManagement if you can use .NET 3.5.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
"DW" <damienwalkeriphone@gmail.com> wrote in message
news:8f16bc19-abc4-4576-8301-948e8162b6be@q23g2000yqn.googlegroups.com...
On Aug 11, 11:01 am, Meinolf Weber [MVP-DS] <meiweb(nospam)@gmx.de>
wrote:
> Hello DW,
>
> May work for what? your posting "Adding Multiple Users to an AD Group at
> One Time" from 5:32 11.8.09?
>
> Best regards
>
> Meinolf Weber
> Disclaimer: This posting is provided "AS IS" with no warranties, and
> confers
> no rights.
> ** Please do NOT email, only reply to Newsgroups
> ** HELP us help YOU!!!http://www.blakjak.demon.co.uk/mul_crss.htm
>
>
>
> > Haven't tried this yet but from MSDN looks like .NET may allow us to
> > do this:
>
> > The following Visual Basic .NET example demonstrates how to add
> > multiple members to a group.
>
> > Visual Basic Copy Code ' Bind to the group.
> > Dim group As New DirectoryEntry(groupDN)
> > ' To add multiple users to a group, use the AddRange method.
> > group.Properties("member").AddRange(New String() {userDN1, userDN2})
>
> > ' Commit the changes to the group.
> > group.CommitChanges()
> >http://msdn.microsoft.com/en-us/library/ms180904.aspx- Hide quoted text -
>
> - Show quoted text -

Yes, I am sorry I didnt post in the correct thread.
Previous Topic:User home directory - admin questions
Next Topic:Roaming obligatory profile *except* in just one PC
Goto Forum:
  


Current Time: Wed Jan 17 04:14:03 MST 2018

Total time taken to generate the page: 0.02371 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software