DCSIMG
Server Core - first steps - Windowmaker's blog

Server Core - first steps

So you have Server Core installed. You have configured the clock, time zone and want to continue those basic tasks you are accustomed to perform when you build a new server. Now when I build a new server, what I usually do is to:

  1. Enable Remote Desktop so I can administer the server from remote
  2. Configure Automatic Updates and install the latest patches
  3. Reconfigure the default Pagefile settings

So if we were talking about "normal" Windows server (you know - the one with GUI, wizards, bells and whistles…), you would be done with that before I finish this sentence, but how do you do those tasks in Server Core ?
Well, apparently Microsoft folks already thought about it and have added a script (SCregEdit.wsf)
to perform the tasks mentioned above.


 Side note: in Server Core (at least on build 5600) the default scripting host from some reason is WScript. If you ask me, that is quite annoying as the whole concept of the system is about avoiding work with windows or anything related to GUI. For you convenience you might want to consider switching to CScript as your default scripting host in order to avoid popups (wscript.echo or other methods) and direct the output to console. You can do it by executing the following command:

C:\Windows\System32>cscript //H:CScript //NOLOGO //s
Command line options are saved.
The default script host is now set to "cscript.exe".


Terminal Service Remote Administration Connections:

 

To view current settings:

C:\Windows\System32>cscript SCregEdit.wsf /AR /v
System\CurrentControlSet\Control\Terminal Server fDenyTSConnections
View registry setting.
1

If you see "1" in the script output, that means that TS connections will be denied. To change that you need to execute:

C:\Windows\System32>cscript SCregEdit.wsf /AR 0
Registry has been updated.

C:\Windows\System32>cscript SCregEdit.wsf /AR /v
System\CurrentControlSet\Control\Terminal Server fDenyTSConnections
View registry setting.
0

Now you can open an RDP session to your Server Core box and start administering it from remote.

 

 

Managing Automatic Windows Updates

 

To view your current Automatic Updates settings:

C:\Windows\System32>cscript SCregEdit.wsf /AU /v
SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update AUOptions
Value not set.

 

As you can see, by default the automatic updates are not configured. In order to configure the AU you have to set the /AU value to one of the following:

/AU [/v][value]

        /v      View the current Automatic Update settings
        value   value you want to set to.

        Options:
        4 - Enable Automatic Updates
        1 - Disable Automatic Updates

i.e. in order to enable automatic updates you would execute:

C:\Windows\System32>cscript SCregEdit.wsf /AU 4
Registry has been updated.

Managing server pagefile settings:

/PF [/v] [minValue] [maxValue]
/v View the current PageFile settings
minValue Minimum Value of the page file size
maxValue Maximum value of the page file size

To view your current settings:

C:\Windows\System32>cscript SCregEdit.wsf /PF /v
SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management PagingFiles
View registry setting.
?:\pagefile.sys

To configure the pagefile to minimum of 512MB and maximum of 1GB:

C:\Windows\System32>cscript SCregEdit.wsf /PF 512 1024
Registry has been updated.

C:\Windows\System32>cscript SCregEdit.wsf /PF /v
SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management PagingFiles
View registry setting.
c:\pagefile.sys 512 1024

 

Time to bed... Roger and out.

Published Tuesday, October 24, 2006 12:38 AM by Guy Teverovsky

Comments

Thursday, February 08, 2007 3:50 AM by Danilo Bordini - IT Pro Expert - Microsoft Brasil

# Longhorn Server Core - Parte 2

Gerenciando Server Core - Linha de Comando (cmd) - Terminal Servier (abre o cmd) - WMI, Windows Remote

Tuesday, November 13, 2007 3:40 AM by Ying Li at myITforum.com

# Windows Server 2008 Server Core - Windows Without GUI

One of the ground breaking features introduced in windows 2008 is Server core - it's a Windows OS

Friday, February 29, 2008 6:18 AM by Greg Tomsho

# re: Server Core - first steps

Finally, somebody actually got the syntax correct for enabling automatic updates.  All of the other sites I have seen have tha parameter as "/au /4" or as "/au /v 4".  Thanks.

Wednesday, March 26, 2008 10:52 PM by Tony Krijnen

# Remote beheer van een Windows Server 2008 Server Core installatie

Vandaag in de Intrack Windows Server 2008 Beheer en Beveiliging heeft Daniel laten zien hoe je met het

Thursday, June 05, 2008 7:48 PM by Ole

# re: Server Core - first steps

So one thing is to enable automatic updates, BUT:

1) How can I view what updates are available ?

2) How can I force current updates to be installed (not useing the default scheduling)?

Monday, August 18, 2008 7:14 PM by David M. Stein

# Windows Server 2008 Core Survival Kit

Ok, not really a "survival kit" in the traditional sense. I don't have a magic download