Link to home
Create AccountLog in
Avatar of Simon336697
Simon336697Flag for Australia

asked on

Batch creatiion of domain local groups

Hi guys hope you are all well and can assist.

We have a need to create more than 60 domain local groups.

The naming format of each of these groups will be:

hmv_c_<XY>

where:

hmv_c_

is to be a mandatory part of each domain local groups name, and with

<XY>

a 2 digit country code, which is to be read from a text file called countries.txt


So, Id like to automate this.

<Script> countries.txt

Here is the contents of countries.txt===========================

AE
AR
AT


etc
------------------

So, basically,

I want to create domain local groups by reading countries.txt, and for each country code, create a domain local group.

Example:

<script> countries.txt

AE
AR
AT

hmv_c_AE
hmv_c_AR
hmv_c_AT

Any help greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of morpheios
morpheios
Flag of Russian Federation image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Simon336697

ASKER

Thanks so much for this.