Windows Server Core: Installation & Configuration.

Last week I wrote that I would have another look at Windows Server Core. This is the second part where I will install and configure Windows Server Core.

Installing is pretty easy. It just looks like a normal Windows Server installation. There is just one difference. In the fourth screen (see below) of the setup you choose for ‘Server Core Installation’ and not for ‘Server with a GUI’. Actually you don’t have to make a choice in the Windows Server 2012 setup because a Server Core installation is the default option now.


I assume that you know how to install Windows. So I will not talk about the rest of the installation. It is pretty much Next, Next and Next on the other screens.

When the installation is finished you are welcomed by this screen.


Just press OK and type a new password on the next screen. When you have done that you will be logged in on you new Windows Server Core installation. And that looks fabulous! Uhmmm, not really! The only thing you will see is a command prompt. Just like the good old days when Windows did not exist.

So now what?? To start some basic configuration tasks you type sconfig.cmd at the command prompt. It provides you with an easy way for changing the server name, add it to a domain, change IP settings and more.


With option 1 you can add the server to a domain or to a workgroup. When you choose option 2 you can change the name of the server. When you look at the options it is very clear what the options do. You can start at the top and then go the next option and the next. When you start configuring with sconfig you will see screens that look a lot like part of a GUI. For example when you change the date and time.

I prefer to start with option 8, Network Settings. Just to make sure that server received a valid IP number from the DHCP server. You can also set a fixed IP number if you want. After that I just follow the list.

As you can see, installing and configuring Windows Server Core is pretty easy. The fun will start after this. The server will not do much in its current state. It has no role(s) configured. I will show that in an other part. But not the next part. The next part will be about configuring Server Core with PowerShell.

Windows Server Core: A GUI-less adventure.

Since Windows Server 2008 we have the possibility to install Windows without the GUI. A so called core installation. I have tried it a few times but never really like it. Managing it was not so easy. And it was only possible to use it for a limited set of server roles. Like Active Directory Services or File Services. It was also possible to use it as a Web Server, but with limitations. For example it was not possible to use

With Windows Server 2008 R2 the Server Core installation became more useful and also more manageable. Even with all the improvements I never really used it.

In Windows Server 2012 the Server Core installation is now the default option. The Windows Server team made a lot of improvements to it. You can use it for almost every Server Role and managing it has become more easy. Also because it is shipped with Powershell 3.0.

So it is time to explore Server Core again. My main focus will be to find out how useful Server Core is as a Web Server and what kind of troubles or limitations I will get into and how to deal with them.

This is it for now. I need to build my test environment first. But I will be back soon with the next part Windows Server Core: Installation & Configuration.

Distribute files to servers with PowerShell

Our streaming platform has 10 edge servers but most of them are on standby. They will only be in service when there is a high demand. Most of the time they are shutdown.

At this point when there is a new costumer or we need to change a setting for an existing customer we have to do this by hand on every server. This is very time consuming of course and there is a risk of making a mistake on one of the edge servers.

The problem is that not all the edge servers are in the same network. So it was not possible to make a script that does a simple file copy. Of course all the servers have an internet connection. So I thought what if I put the configuration files on a web server. And let the edge servers download the files and put them in the right directory.  It sounds like something that could work.

But how do the edge servers know what files to download and where to put them. The last thing I wanted is to have to update the download script on every edge server when I have placed a new configuration file on the web server.

I solved this by placing an xml file on the web server, I called it manifest.xml. In the manifest file I did put the download url for the file and the destination directory on the edge server. The download script now first downloads the manifest.xml file. Parses the xml file and one by one gets the file from the url and places it in the  destination directory. So now I only have to make a change in one place.

You could schedule the script on the server. For example when the server starts.

The current version of the script is not very smart, but it is functional.


## Version: 0.2
## Date: 31-12-2012
#Change $VerbosePreference to Continue to see verbose messages
#Change $VerbosePreference to SilentlyContinue to hide verbose messages
$VerbosePreference = "Continue"

Function Get-FilesDistributionManifest {
 param ([string]$url=$(Throw "ERROR: URL is missing"))

$downloadstring = $url
 $webclient = new-Object System.Net.WebClient

try {
 Write-Verbose "Trying to download file $url"
 [xml]$manifest = $webclient.DownloadString($downloadstring)
 catch [System.Net.WebException]{
 Write-Error "ERROR: Unable to download manifest $url. Check the url!"
 finally {
 Write-Verbose "Succesfully downloaded manifest $url$filename."
Return $manifest

Function Get-FilesDistributionFile {
 param ([ValidateNotNullorEmpty()][string]$url,
 $webclient = new-Object System.Net.WebClient

try {
 Write-Verbose "Trying to download file $url$filename"
 catch [System.Net.WebException] {
 Write-Error "ERROR: Unable to download $url$filename. Check the url!"
 finally {
 Write-Verbose "Succesfully downloaded $url$filename to $destination$filename"
$xml = Get-FilesDistributionManifest -url "http://webserver/manifest/manifest.xml"

foreach ($file in $xml.files.file) {
 Get-FilesDistributionFile -url $($file.url) -filename $($file.filename) -destination $($file.destination)

The manifest.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>

There are some improvements to make to the script.

  1. Authentication on the webserver.
  2. Only download the files when they are changed.
  3. Make a backup of the old file, if it exists, before downloading and replacing.
  4. Better error handling

Feel free to use the script in anyway you like!