RE: FOR command w/NET GROUP /ADD failing, I know why, therefore ?
- From: "Ulf B. Simon-Weidner [MVP]" <nospam2-ulf@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 03:26:10 -0700
Hello Mike,
you can use the DS-Tools, DSMod will allow you to modify objects in AD,
"dsmod group" will modify groups.
Type "dsmod group /?" for the syntax.
--
Gruesse - Sincerely,
Ulf B. Simon-Weidner
Blog: http://msmvps.com/ulfbsimonweidner
"Mike Stantz" wrote:
> Paul,
>
>
>
> Re: > c:\>FOR /F %I in (c:\users.txt) do net group TheGROUPIES %I /ADD
>
>
>
> I found out why it was failing. It was because the groups that were
> defined by the vendor were Dist. Groups, not Security groups, so net
> group add apparently does not work with these.
>
>
>
> Is there a way/command to do this and have it work with Distribution
> Groups?
>
>
>
> Thanks!!!
>
>
>
>
>
>
>
> -----Original Message-----
>
> From: Paul Hinsberg [mailto:paulhins(antispam)@comcast.net]
>
> Posted At: Wednesday, October 26, 2005 1:27 PM Posted To:
> microsoft.public.windows.activedirectory.dsml
>
> Conversation: how to add group membership en masse via .csv?
>
> Subject: Re: how to add group membership en masse via .csv?
>
>
>
> Not case sensitive, but in mine I had assumed C:\ as the location and in
> the one your typed you had a subdirectory listed. :)
>
> --
>
> Paul Hinsberg
>
>
>
>
>
> "Mike Stantz" wrote:
>
>
>
> > Weird, I typed the exact thing and got the error, but when I cut and
>
> > paste yours (minus changing to the appropriate group name) it worked.
>
> > Case sensitive?
>
> >
>
> > Anyway, thanks, it looks like it's working.
>
> >
>
> > Mike
>
> >
>
> >
>
> > -----Original Message-----
>
> > From: Paul [mailto:Paul@xxxxxxxxxxxxxxxxxxxxxxxxx]
>
> > Posted At: Friday, October 21, 2005 6:48 AM Posted To:
>
> > microsoft.public.windows.activedirectory.dsml
>
> > Conversation: how to add group membership en masse via .csv?
>
> > Subject: RE: how to add group membership en masse via .csv?
>
> >
>
> > Quickest way off the top of my head is to export the Excel spread
>
> ***
>
> > to a
>
> > comma delimeted text file. Then create a short script (actually
>
> likely
>
> > a
>
> > single line), that would add the user to the group. To simplify I
>
> would
>
> > make
>
> > it so the users appear in the list as their account names:
>
> >
>
> > Phinsberg
>
> > jsmith
>
> > sjohnson
>
> >
>
> > The test file is called users.txt. The domain group we are adding
>
> them
>
> > to
>
> > is TheGROUPIES
>
> >
>
> > then I would type:
>
> >
>
> > c:\>FOR /F %I in (c:\users.txt) do net group TheGROUPIES %I /ADD
>
> >
>
> > This command will go through the list of names and each of them to the
>
>
>
> > TheGROUPIES domain group.
>
> >
>
> >
>
> > --
>
> > Paul Hinsberg
>
> >
>
> >
>
> > "Mike Stantz" wrote:
>
> >
>
> > > In my AD of 5000 users, I have 2400 users that need to be made a
>
> > member
>
> > > of GroupX in my AD.
>
> > >
>
> > >
>
> > >
>
> > > I have the list of names exported to an Excel *** (in three
>
> columns)
>
> > > as SAMAccountName, LastName, FullName.
>
> > >
>
> > >
>
> > >
>
> > > So, how would I go about parsing (I guess SAMAccountName, since it
>
> is
>
> > > the unique identifier here) from the .csv file, adding all these
>
> users
>
> > > to my specified GroupX?
>
> > >
>
> > >
>
> > >
>
> > > Thanks!!!
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> >
>
> >
>
>
>
>
>
>
>
> ---
>
> Mike Canada
>
> Engineer
>
>
>
>
.
- Prev by Date: Problem with CA Enterprise root
- Next by Date: RE: Redundant DC's ?
- Previous by thread: Problem with CA Enterprise root
- Next by thread: Re: Reset passwords for multiple students
- Index(es):