- Create a DC with domain name of
moros.local
- Run
rand_users.ps1
script to generate a list of users - Copy
generate_ad.ps1, ad-schema.json
to the DC @C:\Windows\Tasks
- Run
.\generate_ad.ps1 ad-schema.json
This will generate users and local admins on your AD forest.
-
Use
sconfig
to:- Change the hostname
- Change the IP address to static
- Change the DNS server to our own IP address (or 127.0.0.1)
-
Install the Active Directory Windows Feature
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Get-NetIPAddress
Make sure the workstation's DNS is set to the DC IP
Add-Computer -Domainname moros.local -Credential moros\Administrator -Force -Restart
To generate a random user, run the following command:
.\rand_users.ps1 ad-schema.json <NUM Users> <NUM Groups> <NUM LocalAdmins>
Example:
.\rand_users.ps1 ad-schema.json 5 5 3
Max No. of Groups: 20
Username Format: First Initial+Lastname (dfriens)
Output:
{
"domain": "moros.local",
"users": [
{
"groups": "Executives",
"name": "Diaz Friens",
"password": "elocin"
},
{
"local_admin": true,
"groups": "Developers",
"name": "Atkins Marila",
"password": "pooh123"
},
{
"local_admin": true,
"groups": "Contractor",
"name": "Sat Silvestri",
"password": "marlboro"
},
{
"groups": "Sales",
"name": "Krauskopf Vecerril",
"password": "softball22"
},
{
"local_admin": true,
"groups": "Developers",
"name": "Randy Woolley",
"password": "nextel"
}
],
"groups": [
{
"name": "Executives"
},
{
"name": "Security"
},
{
"name": "Developers"
},
{
"name": "Sales"
},
{
"name": "Contractor"
}
]
}