Looking to script your AD on Windows Server 2012? Here is the code you will need to create new forest on a new server. This could be useful for setting up some self service scripts for people setting up their own environment. Also, keep this handy when you want to deploy Windows Server 2012 but want to deploy Core instead of GUI.
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath “C:\Windows\NTDS” `
-DomainMode “Win2012” `
-DomainName “ad.contoso.com” `
-DomainNetbiosName “AD” `
-ForestMode “Win2012” `
-InstallDns:$true `
-LogPath “C:\Windows\NTDS” `
-NoRebootOnCompletion:$false `
-SysvolPath “C:\Windows\SYSVOL” `
-Force:$true