Domain Setup from Scratch on Server Core
From Lucca's Wiki
Make sure the PC has an IP address
Install the domain controller services
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools
Make this PC a domain controller. The "Safe Mode Administrator password" is the same as the regular administrator password that is set when first booting the pc.
Install-ADDSForest -DomainName mariocorp -ForestMode Win2016 -DomainMode Win2016 -DomainNetbiosName mariocorp -InstallDns:$true