When Microsoft announced the Server Core functionality of Windows Server 2008 a lot of people got very excited. Server Core is essentially the functionality of a server OS without any of the bloat of either a regular server or workstation OS. There is no graphical user interface (GUI) and it requires much fewer resources than the full installation. You are limited to what roles you can install, but Server Core is perfect for any of the following:
- Active Directory (AD)
- AD Lightweight Directory Services (LDS)
- Hyper-v (virtualization parent)
- DHCP Server
- DNS Server
- File Server
- Media Services
- Print Server
Of course most of these roles would be best administered using their appropriate MMC (Microsoft Management Console) consoles, but for actually running the services Server Core might be your best bet.
In this article I am going to outline six commands that I feel are required knowledge for anyone starting out with Server Core. In later articles I will discuss enabling and managing roles, but today I will cover the following:
- Changing your server name
- Changing your IP address (including Subnet Mask, Default Gateway, and DNS Server)
- Setting a password
- Joining a domain
- Activating Windows
- Enabling Automatic Updates
When you boot into Server Core (after providing credentials) you are given a Command Prompt… and that’s all. There is no Start menu, no desktop shortcuts; the only indication that you are not in an old MS-DOS system is that the Command Prompt is itself in a window. As such a lot of people do not seem to know where to start; here are a few tips to set you on your way:
1) Change your computer’s name to something manageable. Unlike any other edition of Windows when you first start out the name is assigned automatically, without a choice. It will be something like WIN-CE4SRY8Q. Most admins like their server names to mean something to them, but more importantly there are a few commands where you have to type in the system name in a command line… so change it, for our purposes to Core1:
netdom renamecomputer WIN-CE4SRY8Q /NewName:Core1
Of course after renaming your system you have to reboot, so:
shutdown /r /t 0
Note: The /r switch means you are restarting; the /t 0 cuts the time delay to 0 seconds (otherwise you would have to wait a minute before the reboot).
2) Change your IP settings. If you are satisfied with the default settings (like any version of Windows it will try to obtain an address from a DHCP Server) then you can skip this step. Use the ipconfig command as you would normally to verify these settings. To change them:
netsh interface ipv4 show interfaces.
This will show the relevant information about all Network Interface Cards (NICs). For our purposes the NIC will be called Local Area Connection and have an index of 1.
netsh interface ipv4 set address name="Local Area Connection" source=static address=172.16.0.15 mask=255.255.0.0 gateway=172.16.0.1
This assumes a Class B network where the gateway is at 172.16.0.1. Make sure you know your environment before assigning the wrong information or worse, addresses that are already assigned.
netsh interface ipv4 add dnsserver name="Local Area Connection" address=172.16.0.10 index=1
Here our primary DNS server is at 172.16.0.10. At this point you should be able to ping other systems on the network by IP address, Fully Qualified Domain Name (FQDN), or NetBIOS name. If you cannot then verify your settings and connections and then try again.
3) Set the password. Of course this should be done according to your corporate policy but make sure you do not forget:
net user administrator *
You will be prompted to enter and re-enter a new password.
4) Join a Domain. Depending on your needs this may not be necessary, but if you must:
netdom join Core1 /domain:swmi.ca /userd:Administrator /passwordd:*
Note that the switch /passwordd has two Ds at the end; this is not a typo, and corresponds to the /userd. We use the asterix for the password because otherwise it is in clear text, and anyone looking over our shoulder could see our password. However if you are alone in a secure room with no hidden cameras you could simply type /passwordd:P@ssw0rd.
5) Activate Windows Server. Remember that your Server Core installation is a full license of Windows Server, and as such must be activated. Once you have an Internet connection:
A successful activation will not return any message following this command, and you will be returned to the prompt.
6) Enable automatic updates. Although Server Core has a much smaller footprint than a full install, patch management is still important. To enable automatic updates:
cscript c:\windows\system32\scregedit.wsf /au 4
The book that is essentially my bible for Windows Server 2008, Windows Server® 2008 Administrator’s Companion by Charlie Russel and Sharon Crawford, goes into more detail about all of these commands and more. Trust me, it is worth the investment!
There are a couple of interesting slogans I have heard used to refer to Server Core… my favourites are Windows without Windows or, playing on the ad campaign for Windows Vista, The Wow Stops Now. Any way you look at it, the flashiest aspect of Server Core is the lack of flash; it is what admins have been looking for, the ultimate bloatware-free server. Try it out and see what it can do for you!