Table Of Contents
- Part 1 – The Domain
- Part 2 – DNS
- Part 3 – DHCP
- Part 4 – AD OUs, Groups And Users
- Part 5 – Certificate Authority
- Part 6 – WSUS
- Part 7 – Central GPO Store
- Part 8 – SQL Server
- Part 9 – MDT With Chocolatey Integration
After you created all your infrastructure services like AD, DNS and DHCP in this part of the series we are going to add “life” to your Active Directory.
At the moment you have an empty AD like this:
After running the script it will look like this:
You can customize the structure of your AD with csv files. There are csv files for OUs, groups and users.
You can call the script from the command line, e.g.
Or you can edit the variables (path to the csv files etc.) in the script directly.
For creating OUs you just need to enter the names for the OUs – you must not use the LDAP syntax. It’s much easier to read. As the PowerShell cmdlet New-ADOrganisationalUnit does not support creation of OUs recursively, you have to ensure that all parent OUs already exists. To accomplish that just start with the parent OU in the csv and then specify the child OUs. E.g. if you want to create the OU
SQL in the path
Machines/Infra this is what the csv would look like:
The following fields are available in the csv:
- Name = [Name of the group]
- Category [Security or Distribution]
- Scope [DomainLocal, Global or Universal]
- Path [LDAP path to an OU;Variables will be expanded]
E.g. if you want to create the global security group
CtxAdmins in the OU
Groups/CTX the csv file would be the following:
$Domain is specified in the script or as a parameter on the command line.
Basically the same as creating groups. The following fields are available:
- Name [Name of the user]
- Path [[LDAP path to an OU;Variables will be expanded]]
- MemberOf [DisplayName of an AD group the user will get member of. “Domain Users” is default.]