Last active
October 13, 2020 00:14
新しくドメインを作るスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Install ADDS/GPMC/RSAT(ADTools) Components | |
# | |
Add-WindowsFeature AD-Domain-Services, GPMC, RSAT-ADDS, RSAT-AD-PowerShell | |
# | |
# Create new Forest/Domain | |
# | |
Import-Module ADDSDeployment | |
$Params = @{ | |
DomainName = "contoso.local"; | |
DomainNetbiosName = "CONTOSO"; | |
ForestMode = "Win2012R2"; | |
DomainMode = "Win2012R2"; | |
DatabasePath = "C:\Windows\NTDS"; | |
LogPath = "C:\Windows\NTDS"; | |
SysvolPath = "C:\Windows\SYSVOL"; | |
SafeModeAdministratorPassword = (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force); | |
InstallDns = $true; | |
CreateDnsDelegation = $false; | |
NoRebootOnCompletion = $false; | |
Confirm = $false; | |
} | |
Install-ADDSForest @Params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Windows Server 2016 - 2019 版 | |
# | |
# Install ADDS/GPMC/RSAT(ADTools, DNS) Components | |
# | |
Add-WindowsFeature AD-Domain-Services, GPMC, RSAT-ADDS, RSAT-AD-PowerShell, RSAT-DNS-Server | |
Import-Module ADDSDeployment | |
$Params = @{ | |
DomainName = "corp.contoso.com"; | |
DomainNetbiosName = "CORP"; | |
ForestMode = "WinThreshold"; | |
DomainMode = "WinThreshold"; | |
DatabasePath = "C:\Windows\NTDS"; | |
LogPath = "C:\Windows\NTDS"; | |
SysvolPath = "C:\Windows\SYSVOL"; | |
SafeModeAdministratorPassword = (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force); | |
InstallDns = $true; | |
CreateDnsDelegation = $false; | |
NoRebootOnCompletion = $false; | |
Confirm = $false; | |
} | |
Install-ADDSForest @Params |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment