As I’ve completely rebuilt my demo/lab machine I need to re-create the Active Directory
This is now so simple even on a server core machine
First install the roles and features needed
Add-WindowsFeature -Name AD-Domain-Services, RSAT-AD-PowerShell, DNS, RSAT-DNS-Server, DHCP, RSAT-DHCP
This adds AD, DNS, DHCP and the appropriate admin tools – as its server core we’re really talking about the relevant PowerShell modules
Installing AD just gets you ready – it doesn’t create the forest
You get the ADDSDeployment module
PS C:\Scripts> Get-Command -Module ADDSDeployment
Name
—-
Add-ADDSReadOnlyDomainControllerAccount
Install-ADDSDomain
Install-ADDSDomainController
Install-ADDSForest
Test-ADDSDomainControllerInstallation
Test-ADDSDomainControllerUninstallation
Test-ADDSDomainInstallation
Test-ADDSForestInstallation
Test-ADDSReadOnlyDomainControllerAccountCreation
Uninstall-ADDSDomainController
To create the forest and the first domain controller
PS C:\Scripts> Install-ADDSForest -DomainName ‘Manticore.org’ -ForestMode Default -DomainMode Default -InstallDns
SafeModeAdministratorPassword: ********
You’ll be asked to confirm the safe mode password
Default for forest and domain mode matches the Windows version
PS C:\Users\Administrator> Get-ADForest
ApplicationPartitions : {}
CrossForestReferences : {}
DomainNamingMaster : W16DC01.Manticore.org
Domains : {Manticore.org}
ForestMode : Windows2016Forest
GlobalCatalogs : {W16DC01.Manticore.org}
Name : Manticore.org
PartitionsContainer : CN=Partitions,CN=Configuration,DC=Manticore,DC=org
RootDomain : Manticore.org
SchemaMaster : W16DC01.Manticore.org
Sites : {Default-First-Site-Name}
SPNSuffixes : {}
UPNSuffixes : {}
PS C:\Users\Administrator> Get-ADDomain
AllowedDNSSuffixes : {}
ChildDomains : {}
ComputersContainer : CN=Computers,DC=Manticore,DC=org
DeletedObjectsContainer : CN=Deleted Objects,DC=Manticore,DC=org
DistinguishedName : DC=Manticore,DC=org
DNSRoot : Manticore.org
DomainControllersContainer : OU=Domain Controllers,DC=Manticore,DC=org
DomainMode : Windows2016Domain
DomainSID : S-1-5-21-759617655-3516038109-1479587680
ForeignSecurityPrincipalsContainer : CN=ForeignSecurityPrincipals,DC=Manticore,DC=org
Forest : Manticore.org
InfrastructureMaster : W16DC01.Manticore.org
LastLogonReplicationInterval :
LinkedGroupPolicyObjects : {CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=Manticore,DC=o
rg}
LostAndFoundContainer : CN=LostAndFound,DC=Manticore,DC=org
ManagedBy :
Name : Manticore
NetBIOSName : MANTICORE
ObjectClass : domainDNS
ObjectGUID : 05d9aa61-d422-4728-9595-77754934b948
ParentDomain :
PDCEmulator : W16DC01.Manticore.org
PublicKeyRequiredPasswordRolling : True
QuotasContainer : CN=NTDS Quotas,DC=Manticore,DC=org
ReadOnlyReplicaDirectoryServers : {}
ReplicaDirectoryServers : {W16DC01.Manticore.org}
RIDMaster : W16DC01.Manticore.org
SubordinateReferences : {CN=Configuration,DC=Manticore,DC=org}
SystemsContainer : CN=System,DC=Manticore,DC=org
UsersContainer : CN=Users,DC=Manticore,DC=org