Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ドメインに追加のドメインコントローラーを昇格させるスクリプト
#
# Install ADDS/GPMC/RSAT(ADTools) Components
#
Add-WindowsFeature AD-Domain-Services, GPMC, RSAT-ADDS, RSAT-AD-PowerShell
#
# Install New Domain Controller
#
Import-Module ADDSDeployment
$DomainName = "contoso.local"
$Cred = New-Object PSCredential "administrator@$DomainName",(ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force)
$Params = @{
Credential = $Cred;
DomainName = $DomainName;
SiteName = "Default-First-Site-Name";
DatabasePath = "C:\Windows\NTDS";
LogPath = "C:\Windows\NTDS";
SysvolPath = "C:\Windows\SYSVOL";
ReplicationSourceDC = "";
NoGlobalCatalog = $false;
CriticalReplicationOnly = $false;
SafeModeAdministratorPassword = (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force);
InstallDns = $true;
CreateDnsDelegation = $false;
NoRebootOnCompletion = $false;
Confirm = $false;
}
Install-ADDSDomainController @Params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.