Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/21bshwjt/build_replica_domaincontroller
Build Replica Domain Controller using PowerShell
https://github.com/21bshwjt/build_replica_domaincontroller
active-directory adds powershell powershell-adminscripts powershell-script
Last synced: about 1 month ago
JSON representation
Build Replica Domain Controller using PowerShell
- Host: GitHub
- URL: https://github.com/21bshwjt/build_replica_domaincontroller
- Owner: 21bshwjt
- Created: 2021-04-13T19:26:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T11:21:55.000Z (10 months ago)
- Last Synced: 2024-03-01T12:31:39.801Z (10 months ago)
- Topics: active-directory, adds, powershell, powershell-adminscripts, powershell-script
- Language: PowerShell
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Build Replica DomainController
### Prerequisites
- One existing Domain Controller
- WinRMBuilding (DcPromo) a Domain Controller over the network is a pain; mainly when NTDS.DIT size is big. That is a time-consuming activity in replacing an existing Domain Controller.
The above code won't take more than 20/25 mins to build a Domain Controller if NTDS.DIT within 10 GB. DSRM password needs to be provided by Admins.**Use case**: Building a Domain Controller manually is a time-consuming process, typically requiring a minimum of 4 to 5 hours over the network. However, the provided code streamlines this task and can construct a domain controller in under 30 minutes, especially if there is another domain controller present in the local network.
### Notes
```diff
# 1. The time required can fluctuate based on the performance of both the VM and the network.
# 2. Sysvol will automatically reconstruct following a reboot.
# 3. A manual reboot is needed after the promotion is completed.
# 4. Additional logs will be created in 'C:\temp' folder.
# 5. While the code has undergone multiple successful tests in production, it is advisable to independently validate its performance before deploying it to the production environment.
# 6. Successfully tested on both On-Premises and Azure Virtual machines.
```
### Deploy first DC in your Domain
```powershell
#
# Windows PowerShell script for AD DS Deployment
#Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "bshwjt.internal" `
-DomainNetbiosName "BSHWJT" `
-ForestMode "WinThreshold" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
``````diff
- Do not forget to remove the IFM Backup once the Domain Controller promotion is completed.
```
___________________________________________________________________________________________________________________- [**Wiki**](https://21bshwjt.github.io/Build_Replica_DomainController/)
- [**Me@LinkedIn**](https://www.linkedin.com/in/bshwjt/)