gblumberg2
IS-IT--Management
Hi, all i would like to write a script that reads from a txt file that would create multiple global security groups within a nested OU.
here is the script i am using to create one group within a nested ou.
Const ADS_GROUP_TYPE_GLOBAL_GROUP = &h2
Const ADS_GROUP_TYPE_SECURITY_ENABLED = &h80000000
Set objOU = GetObject("LDAP://ou=users_306,ou=Jacobs Heights III (306),ou=Properties,dc=domain,dc=com")
Set objGroup = objOU.Create("Group", "cn=maint_306")
objGroup.Put "sAMAccountName", "maint_306"
objGroup.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP Or _
ADS_GROUP_TYPE_SECURITY_ENABLED
objGroup.SetInfo
I have 4 security groups that need to be created and one universal mail enabled distribution group that needs to be created as well for each nested OU
I have 90+ OUs to do this for.
any help would be appreciated, i currently have the data in an .xls file if i need to attach so you can see the names of the groups i am trying to create.
thanks in advance.
here is the script i am using to create one group within a nested ou.
Const ADS_GROUP_TYPE_GLOBAL_GROUP = &h2
Const ADS_GROUP_TYPE_SECURITY_ENABLED = &h80000000
Set objOU = GetObject("LDAP://ou=users_306,ou=Jacobs Heights III (306),ou=Properties,dc=domain,dc=com")
Set objGroup = objOU.Create("Group", "cn=maint_306")
objGroup.Put "sAMAccountName", "maint_306"
objGroup.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP Or _
ADS_GROUP_TYPE_SECURITY_ENABLED
objGroup.SetInfo
I have 4 security groups that need to be created and one universal mail enabled distribution group that needs to be created as well for each nested OU
I have 90+ OUs to do this for.
any help would be appreciated, i currently have the data in an .xls file if i need to attach so you can see the names of the groups i am trying to create.
thanks in advance.