38 - Module-1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Gravitycyber.com.

au

Module 1: Active Directory Domain Services

PowerShell Commands to remotely promote a Second Domain Controller (VIC-Srv1) in GCyber forest.

1. From VIC-DC1, Type the following command to check which AD DS roles and features are installed on
VIC-Srv1, and then press Enter:

Get-WindowsFeature –ComputerName VIC-Srv1 > report.txt

2. Type the following command to Install the AD DS role on VIC-Srv1, and then press Enter:
Install-WindowsFeature –Name AD-Domain-Services –ComputerName VIC-Srv1

3.Type the following command to verify that the AD DS role is installed on VIC-Srv1, and then press
Enter:

Get-WindowsFeature –ComputerName VIC-Srv1

4. Install the domain controller role by running the following command on VIC-DC1, and then press
Enter:

Invoke-Command –ComputerName VIC-SRV1 {Install-ADDSDomainController –


NoGlobalCatalog:$true –Credential (Get-Credential) –CriticalReplicationOnly:$false –
DatabasePath “C:\Windows\NTDS” –DomainName “GCyber.local” –InstallDns:$false –LogPath
“C:\Windows\NTDS” –NoRebootonCompletion:$false –SiteName “Default-First-Site-Name” –
SysvolPath “C:\Windows\SYSVOL” –Force:$true }

PowerShell commands for deploying domain controllers by performing domain controller cloning

1. At the Windows PowerShell command prompt, type the following command, and then press Enter:

Get-ADDCCloningExcludedApplicationList

2.Verify the list of critical apps. In production, you need to verify each app or use a domain controller
that has fewer apps installed by default. Type the following command, and then press Enter:

Get-ADDCCloningExcludedApplicationList –GenerateXML

3.Type the following command to create the DCCloneConfig.xml file, and then press Enter:

New-ADDCCloneConfigFile
Gravitycyber.com.au

4.To modify the cloned machine with specific settings, Type the following command, and then press
Enter:
New-ADDCCloneConfigFile –Static -IPv4Address “192.168.0.15” -IPv4DNSResolver “192.168.0.4” -
IPv4SubnetMask “255.255.255.0” –CloneComputerName “VIC-Srv3” -IPv4DefaultGateway “192.168.0.1”
-SiteName “Default-First-Site-Name”

5.Type the following command to shut down VIC- Srv1, and then press Enter:

Stop-Computer

PowerShell Commands to demote the Cloned Domain Controller

Test-ADDSDomainControllerUninstallation

Uninstall-ADDSDomainController

Uninstall-WindowsFeature AD-Domain-Services

You might also like