Windows Server Core notes

Initial setup tasks

(some commands taken from Sander Berkouwer: How to install a Server Core R2 Domain Controller)

For most tasks, you can use sconfig.cmd. But, if you’re not running Server Core, or you just want to know how to do it yourself, here are some examples in no particular order:

In addition, cscript scregedit.wsf /cli shows some other useful commands.

Server role / feature configuration

Domain controller

To promote the machine to be a domain controller (in this example, in a new forest):

dcpromo /NewDomain:forest /NewDomainDNSName:deep6.test /ReplicaOrNewDomain:domain /InstallDNS:yes /SafeModeAdminPassword:hunter2

You could instead create an answer file for unattended installation:


And then run:

dcpromo /unattend:unattend.txt

PowerShell version (may require role addition – to be tested):

Import-Module ADDSDeployment ; Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath "C:\Windows\NTDS" -DomainMode "WinThreshold" -DomainName "deep6.test" -DomainNetbiosName "DEEP6" -ForestMode "WinThreshold" -InstallDns:$true -LogPath "C:\Windows\NTDS" -NoRebootOnCompletion:$false -SysvolPath "C:\Windows\SYSVOL" -Force:$true

Server / domain administration

Active Directory

The ‘easiest’ way to do command-line administration of AD is probably with the ds* commands. Here are some examples to get you started:

If you’re feeling penitent, here are some wmic commands instead:

Unfortunately it’s not possible to use wmic to set user properties; the Active Directory (DS) WMI Provider has a quirky way of updating properties.


dnscmd.exe is the usual command-line utility for DNS management.

Feel free to contact me with any questions, comments, or feedback.