Server Core is a Windows Server 2008 installation option designed to provide core network infrastructure services without all the unnecessary Windows components. You can use these command-line commands to change the administrative password, rename the computer, manage server roles, and other necessary functions to setup and customize your Server Core environment.
Server Core is a Windows Server 2008 installation option designed to provide core network infrastructure services without all the unnecessary Windows components, and it’s one of the best features in Server 2008. However, because Server Core dispenses with the familiar Windows interface—leaving you with just the command line to manage things—your first steps to setting up a new Server Core installation might leave you wandering around in the dark. In this column, I’ll jump-start your setup process by showing the 10 most essential Server Core setup commands.
1. Change the administrative password—One of the first things you should do with any new system setup is to change the administrative password. On Server Core, you can change the password using the Net User command. To be prompted to enter a new password, use the following command:
net user administrator *"
2. Change the system name—Next, you’ll want to rename the computer to a name that coincides with your current naming system. The following example shows how to use Netdom to rename your Server Core system to MyServerCore:
netdom renamecomputer %computername% /NewName:MyServerCore
3. Reboot the system—After you’ve changed the system name, you’ll need to reboot the system. You can use the Shutdown command with the /r switch to reboot a Server Core system:
4. Set up a static IP address—Many organizations use static IP addresses for their infrastructure servers. You can change Server Core’s dynamic IP address to the static IP address of 192.168.1.100 and point it to the DNS server at 192.168.1.1 with the following commands:
netsh interface ipv4 set address name="Local Area Connection" source=static address=192.168.1.100 mask=255.255.255.0
netsh interface ipv4 add dnsserver name="Local Area Connection" address=192.168.1.1
5. Change the time zone—Server Core has a simple control panel GUI that lets you change the system’s time zone. You launch the GUI with the following command:
6. Join a domain—You’ll also probably want your Server Core system to be a part of your domain. You use the Netdom command as shown below to add the Sever Core system to a domain called MyDomain using the user ID of MyLogin.
netdom join %computername% /domain:MyDomain /userd: MyDomain\MyLogin /passwordd:*
7. Managing roles—Server Core’s basic functionality is defined by adding one or more of the nine built-in server roles. Server Core’s available roles can be displayed using the Oclist command. You add server roles to Server Core using the Ocsetup command. The following example shows how to add the Hyper-V virtualization role:
start /w ocsetup Microsoft-HYPER-V
8. Enable remote desktop administration—One thing to remember if you use remote desktop administration with Server Core is that you still won’t have a GUI. Instead, you’ll be remoting into Server Core’s minimal command-line interface. You enable remote administration for Server Core using the following command:
cscript %windir%\system32\SCRegEdit.wsf /ar 0
9. Enable Automatic Updates—One of the big advantages of Server Core and its small footprint is that it requires significantly less patching. Some early Microsoft estimates put the patching requirements at 60 percent less than a standard Windows Server implementation. You turn on Automatic Updates using the scregit .wsf script:
cscript scregedit.wsf /AU 4
10. Activate the server—Yes, even Server Core systems must be activated. (Remember back in the Windows XP days when Microsoft said that only desktop systems would need activation? Yeah, right.) You activate Server Core with the slmgr.vbs script: