Create security groups with a script

  • Thread starter Thread starter m0rk
  • Start date Start date
M

m0rk

I could do with getting to grips with scripting for active directory ...
one task that it could help me with is a script that will ask me for a
name, then go off and create 12 security groups from that name and dump
them in an OU I can move where I need it.

Is scripting able to do thist sort of thing? ... basically, id want to
run the script, give it a name such as LOCATIONFOLDERNAME and end up
with 12 security groups dumped into an OU such as:-

DL_LOCATIONFOLDERNAME_FC
DL_LOCATIONFOLDERNAME_C
DL_LOCATIONFOLDERNAME_NA
DL_LOCATIONFOLDERNAME_R
DL_LOCATIONFOLDERNAME_R&W
DL_LOCATIONFOLDERNAME_L
GG_LOCATIONFOLDERNAME_FC
GG_LOCATIONFOLDERNAME_C
GG_LOCATIONFOLDERNAME_NA
GG_LOCATIONFOLDERNAME_R
GG_LOCATIONFOLDERNAME_R&W
GG_LOCATIONFOLDERNAME_L

.... at which point the GG groups are added to the relevant DL group. Its
not a choice I have, just instructions to follow and cant stop the
madness, just have to try and ease the pain.

I dont mind putting the effort in to get to grips with scripts, but nice
to know what I want will be possible .... ?
 
Can a script be written to take a name as input and create a bunch of groups
using that name (and hard-coded prefixes and suffixes) and then add groups
into other groups? Of course.

Start here:
-- http://www.microsoft.com/technet/scriptcenter/default.mspx


Post back with any queries. There's also scripting newsgroups, but the AD
groups are pretty good for ADSI and ADO scripting too.
 
Back
Top