24.5 C
Dubai
Tuesday, December 6, 2022

Active Directory Quick Deployment scripts in Windows 2012 R2 – New/Add

Had to build domain controllers often for production and testing. These are my handy commands which i use to add domain controllers or build fresh environments in production, and to quickly build labs for testing purposes.

Hope it will be useful for everyone.  Will be covering building new domain controller and adding a domain controller.

Lets see how to build a new Domain Controller and add a additional domain controller – with Quick Powershell Commands

Step1:

Login to the first machine to build a first domain controller in the environment.

Open PowerShell – Run

Rename Computer –

Rename-Computer -NewName AD001 -Restart

Rename Domain Name as per your requirements in below commands-

Add-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "Cloudid.com" -InstallDNS

After Rebooting automatically – Primary Domain Controller is READY !!

Start – Run – dsa.msc – Just to see AD tools

image

====

Step2:

To Add Domain Controller

Rename-Computer -NewName AD002 -Restart

Login to the new local machine – Add the machine to the domain. (Hope you already entered Primary DNS IP in the LAN)

Add-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSDomainController -InstallDns -DomainName "Cloudid.biz"

 

After Reboot – Secondary Domain Controller is added.

AD

 

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Specialized in Microsoft Azure - Office 365 / Microsoft Exchange; conducted numerous projects worldwide in designing, supporting, and implementing messaging and virtualization infrastructure for medium-sized and large enterprises. Further, I am a Cloud Architect and Technical Advisor for various start-ups.

Related Articles

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?