WTFoX
Newbie

Posts: 14
|
 |
« on: May 21, 2009, 12:03:53 AM » |
|
Hi all, I was testing today with RES Wisdom 2009 SR1 (which is a great product ofcourse  ). My goal was (and still is) to create a module which creates a number of Active Directory Global Security Groups in one step. Let's say: i want to add 10 Global Groups, named Group1, Group2, etc etc. There is a possibility with 'dsadd group' command, but probably someone overhere knows a more charming way ... I like to hear from you guys ...
|
|
|
|
|
Logged
|
|
|
|
Starup
RESUG Forum Moderator
Newbie
  
Posts: 37
Starup
|
 |
« Reply #1 on: May 21, 2009, 10:59:28 PM » |
|
|
|
|
|
« Last Edit: May 21, 2009, 11:02:32 PM by Starup »
|
Logged
|
Sincerely,
Thomas Starup
|
|
|
WTFoX
Newbie

Posts: 14
|
 |
« Reply #2 on: May 22, 2009, 06:32:06 PM » |
|
Hi there! Thanx for the links Thomas. So, i've created the following script:
Set objOU = GetObject("LDAP://OU=Groups,OU=GG,DC=DC01,DC=domain,DC=local") For i = 1 To 10 Set objGroup = objOU.Create("Group", "CN=Groupname" & i) objGroup.Put "sAMAccountName", "Groupname" & i objGroup.SetInfo Next
I've created two RES Wisdom Parameters: $[Groupname] (name of the groups) and $[Number] (number of groups to create). The script looks like this:
Set objOU = GetObject("LDAP://OU=Groups,OU=GG,DC=DC01,DC=domain,DC=local") For i = 1 To $[Number] Set objGroup = objOU.Create("Group", "CN=$[Groupname]" & i) objGroup.Put "sAMAccountName", "$[Groupname]" & i objGroup.SetInfo Next
It all works fine! THNX Again
|
|
|
|
« Last Edit: May 22, 2009, 06:34:02 PM by WTFoX »
|
Logged
|
|
|
|
Starup
RESUG Forum Moderator
Newbie
  
Posts: 37
Starup
|
 |
« Reply #3 on: May 22, 2009, 07:33:06 PM » |
|
Hi, Looks great  You're more than welcome to write anytime.
|
|
|
|
|
Logged
|
Sincerely,
Thomas Starup
|
|
|
WTFoX
Newbie

Posts: 14
|
 |
« Reply #4 on: May 22, 2009, 11:43:44 PM » |
|
The next step is to create a same script with PowerShell 
|
|
|
|
|
Logged
|
|
|
|
Starup
RESUG Forum Moderator
Newbie
  
Posts: 37
Starup
|
 |
« Reply #5 on: May 23, 2009, 01:12:21 PM » |
|
The next step is to create a same script with PowerShell  True - try it out http://www.idera.com/Products/PowerShell/PowerShell-Plus/ looks like a cool editor! Let us know, what you find out.
|
|
|
|
|
Logged
|
Sincerely,
Thomas Starup
|
|
|
Jeff Wouters
Newbie

Posts: 25
|
 |
« Reply #6 on: June 02, 2009, 08:34:44 AM » |
|
Know that editor  Love it!  My replacement for WebEdit when it comes to PowerShell 
|
|
|
|
|
Logged
|
|
|
|
Eddie
Newbie

Posts: 4
|
 |
« Reply #7 on: June 02, 2009, 05:46:43 PM » |
|
Hello guys, Am I missing the point here? There is a possiblility to create an AD task within RES Wisdom. The next thing you do is create a parameter for the group name. Now, You can schedule this task and use a CSV file to create as much AD groups as you like(on the parameter tab when scheduling a job! Here is the Building block attached..... Hope this one was helpful greetz, Eddie (by the way, after 10 years of scripting, I now try to prevent it.....  )
|
|
|
|
« Last Edit: June 02, 2009, 05:48:52 PM by Eddie »
|
Logged
|
|
|
|
Starup
RESUG Forum Moderator
Newbie
  
Posts: 37
Starup
|
 |
« Reply #8 on: June 02, 2009, 06:59:11 PM » |
|
Hi Eddie,
Welcome to forum!
The point was to create an "easy" way to create from 1->XXX number of groups. Of course, you're right - it can be achived by your BB above.
So again - nice post ;-)
|
|
|
|
|
Logged
|
Sincerely,
Thomas Starup
|
|
|
Airdeca
Newbie

Posts: 31
|
 |
« Reply #9 on: June 03, 2009, 10:25:49 PM » |
|
Just putting some oil on the flames,
I have to agree with Eddie. Why script when you've got RES Wisdom?
Rob
|
|
|
|
|
Logged
|
|
|
|
RESguru
RESUG Forum Moderator
Jr. Member
  
Posts: 62
|
 |
« Reply #10 on: June 10, 2009, 02:24:44 PM » |
|
Hello guys,
Am I missing the point here? There is a possiblility to create an AD task within RES Wisdom.
Here is the Building block attached.....
Hi Eddie, No - I don't think you missed the point. In fact I think you hit it spot on. I've taken the liberty to quote your posting on the main sites' Wisdom BB archive: http://www.resug.com/wisdom-buildingblock-archive
|
|
|
|
|
Logged
|
|
|
|
|