How to enable automatic Windows Update on Windows Server 2008 R2 Core

It’s important to keep your Windows Server up to date. Here’s how to enable Windows Update on Windows Server Core.

The Windows Server Core product is an excellent server edition for running a Domain Controller in a development setup. One thing to keep in mind is that Windows Update is by default turned off. It’s really a good practice to turn it on to download and install updates automatically. Here I will describe the steps necessary to enable Windows Update on Windows Server Core.

Start sconfig

Screenshot, Windows Update on Windows Server Core
 

 

 

 

 

 

Select option 5) and set it to A) (Automatic updates).

Then it’s a good idea to download and install the latest updates by selecting option 6)

Windows Server Core as a domain controller

Windows Server Core as a domain controller

This post will describe the steps for setting up a Windows Server Core as a domain controller for an Active Directory (AD) domain. Why would you do that? Well, first and foremost, it’s very useful for a developer to have a dedicated AD Domain Controller running on Windows Server Core since it’s a much smaller and leaner operating system then the full blown Windows Server product. You’ll most likely also run your domain controller in a virtual environment such as Hyper-V or VMWare and Windows Core is much less demanding on your resources, let alone more secure since it has a much smaller attack surface area.

Steps:

Install Windows Server Core

Rename the computer

First determine the current computer name. The easiest way to do this is to type SET and copy the COMPUTERNAME value.

>netdom renamecomputer <CurrentComputerName> /NewName:<YourNewName>

Set the IP address to a static address

>netsh int ip set address “Local Area Connection” static 192.168.65.210 255.255.255.0 192.168.65.2 1

Set the DNS Server

>netsh interface ipv4 add dnsserver name=”Local Area Connection” address=192.168.65.2 index=1

Install the DNS Role

>start /w ocsetup DNS-Server-Core-Role

Create the new Domain

>dcpromo /unattend:c:\unattend.txt

Checking if Active Directory Domain Services binaries are installed…
Active Directory Domain Services binaries are being installed. Please wait…
And then it will continue setting up your domain and automatically reboot.

Unattend.txt sample:

[DCINSTALL]
AutoConfigDNS=Yes
DomainNetBiosName=devdomain
NewDomainDNSName=devdomain.local
ReplicaOrNewDomain=Domain
NewDomain=Forest
ForestLevel=3
DomainLevel=3
SafeModeAdminPassword=Password1234
RebootOnSuccess=Yes