PowerShell – Deploying Active Directory

In our projects, as much as I want to automate the deployment my domain controllers from scratch, our team doesn’t own the hosted platform, we come with the VMs already pre-created for us. In this scenario we are deploying a new Domain with the following configurations:

Domain name: Jdeployment

Single-Forest, Single Domain

4 Domain Controllers across 2 sites

Active Directory will be installed in Drive D:

Install Remote Server Administration Tools (RSAT)

Create 2 new Active Directory Sites (Site 1 and Site 2)

Assign Site1 Subnets to the Site1 Active Directory Site

Create a new replication site link between Site1 and Site2 and set the replication frequency to every 15 minutes

# Create a new replication site link between Site1 and Site2 and set the replication frequency to every 15 minutes #New-ADReplicationSiteLink -Name “SL-Site1-Site2” -SitesIncluded Site1,Site2 -Cost 100 -ReplicationFrequencyInMinutes 15 -InterSiteTransportProtocol IP