Introduction To Server Core
Introduction To Server Core
Introduction To Server Core
products based on what the market demands. In addition, it fends off the
competition by integrating the strengths and features the others have to offer.
Thus, with Server Core, introduced in Windows Server 2008 and improved in
Windows Server 2012 R2, Microsoft has enhanced its Windows operating systems to
combat its competitors’ and meet the demands of system administrators who want
to work from the command line. Within this chapter, we’ll explore what’s new in the
Windows Server 2012 R2 operating system and how to manage it using PowerShell.
In this chapter, you will learn to: ◆ Use the new functionality in Server Core ◆ Install
and confi gure Server Core ◆ Set up Server Core for a branch-offi ce deployment ◆
Remotely manage the operating system What’s New in Server Core You’re installing
Windows Server 2012 R2 for the fi rst time, and a couple of screens into the
installation you see the installation options. Should you use the GUI or not? You like
the benefi ts Server Core has with regard to security and overhead savings, but you
like the point-and-click UI that comes with the GUI version. We have good news for
you: In Windows Server 2008 R2, once Server Core was set up you couldn’t switch
back, but in Windows Server 2012 R2 you can now switch back and forth between
Server Core and the GUI. The default installation choice is Server Core, but should
you choose to install using the GUI, you will still have PowerShell available. Once
you have the server set up and ready to run in production, you can simply switch
over to Server Core. Keep in mind as you read this chapter that even though you
can switch to the GUI version to accomplish the same tasks, we will be using Server
Core to do those tasks. For example, we will be showing you how to validate your
copy of Windows using Server Core. You may fi nd it easier to switch to the GUI
version to accomplish this, and that’s fi ne if you choose to do it that way. Most of
the samples in this chapter are also in Chapter 2, “Installing and Upgrading to
Windows Server 2012 R2,” if you want to use the GUI for these tasks. PowerShell
3.0 now offers you more cmdlets to administer your Server Core server. The
cmdlets’ syntax is now simpler to understand. Many of the existing cmdlets have
had parameters added to extend their functionality. See the Survival Guide later in
this chapter for a complete list of the new cmdlets added in Windows Server 2012
R2. 106 | CHAPTER 3 INTRODUCTION TO SERVER CORE What Is Server Core? Server
Core is Windows Server stripped to the minimum requirements to run an operating
system. It runs without the GUI, Windows Explorer, Internet Explorer, and other
dependent components. Removing the extras means that we have to cope without
many of the administration tools that we know and love, namely, snap-ins built on
the Microsoft Management Console. Th is leaves the PowerShell command prompt
as our primary interface to the operating system. So what does this all mean to you,
the administrator? Reduced Maintenance Less code means fewer updates to
perform. Reduced Attack Surface Without the fl uff , there is less to attack. Roles
and features can be installed as needed and the limited number of services will
reduce the areas for attack. Reduced Performance Requirements Server Core takes
fewer CPU cycles and less hard disk space, so the opportunity to repurpose
hardware is increased with this option. Installing Server Core Before you install
Server Core, keep in mind that since you can switch between Server Core and the
GUI, it does not matter which version you initially set up. This allows you to set up
the server in the GUI, as we showed you in Chapter 2, and then switch it over to
Server Core. The process for installing Windows Server 2012 R2 Server Core is as
straightforward as other Windows Server 2012 R2 installations. You pop in the
installation DVD and allow the server to boot from it. Then you “follow the bouncing
ball.” You can use an unattended installation .xml f i le to confi gure the OS all the
way down to the installed features. You can generate the fi le with the Windows
Automated Installation Kit, which we won’t cover in this chapter. The Setup program
lets you select the operating system to install, as shown in Figure 3.1. Figure .
Selecting to install Server Core from the various editions of Windows Server 2012
R2 INSTALLING SERVER CORE | 107 . For Server Core, select the desired edition,
Standard or Datacenter, and click Next. . Accept the license terms and click Next.
The next screen asks which type of installation you want. . Since you are doing a
clean install, select Custom. The next screen asks, “Where do you want to install
Windows?” as shown in Figure 3.2. Figure . Choosing the installation partition We
prefer dividing the drive into two partitions: 50 GB for the operating system and the
remainder for data or applications. This provides a smaller backup for the system
drive. The tricky part of this is projecting the right size. Additional applications,
service packs, security updates, and patches can drive up the overall size to the
capacity of the small partition. This can cause system instability and potentially
require a rebuild. . Using the options on the bottom of the screen, click New to
create the 50 GB partition. Windows Setup also created the 350 MB system
partition. This holds the recovery con sole operating system. You can’t delete this
partition. Don’t worry about this unavailable space; thumb drives come in bigger
sizes now. . After a successful installation, use the Administrator account to log on
as with a full installation. . There is no assigned password, so enter a new one.
Once the installation fi nishes building the administrator’s profi le, the desktop
appears, as shown in Figure 3.3, which looks very spartan. There’s no Server
Manager, no taskbar, no system tray—no nuttin’. There’s just an open command
prompt. 108 | CHAPTER 3 INTRODUCTION TO SERVER CORE Figure . T h e barren
Server Core user interface For this book, we’ve changed the default settings for the
PowerShell command prompt for readability. The default is white letters on a black
background. You can make similar changes by right-clicking the upper-left corner of
the screen and selecting Properties. Then you can modify the color of the fonts and
backgrounds on the Colors tab, as shown in Figure 3.4. Figure . Modifying the
command prompt window SERVER CORE SURVIVAL GUIDE | 109 Server Core
Survival Guide Before getting into the details, you need to learn a few survival tips
for handling this operating system. We’ll discuss accessing Task Manager to control
processes, start tasks, and view performance. Then we’ll cover basic commands
that we typically neglect when a fl ashy GUI is available. These will help you
perform routine administration tasks and allow access to the network. Switching
between Server Core and the GUI and Vice Versa I’m placing this at the top of the
Survival Guide because it may prove to be very handy should you need to switch
from Server Core to the GUI and vice versa. Many administrators complete the
initial setup using the GUI and switch over to Server Core for production. You will
need to download the script located here: http://gallery.technet
.microsoft.com/scriptcenter/Switch-between-Windows-9680265d/file/70875/1/
SwitchGUIServerCORE.zip. This script is used no matter which version you are
switching to. Before you run the script, you need to enable scripts on the server;
they are disabled by default. To do this, run the following cmdlet: PS C:\>Set-
ExecutionPolicy AllSigned Using PowerShell, you can now run the script from the
location where you downloaded the f i le, as shown in Figure 3.5. Figure . Running
the PowerShell script Where prompted, add the integer value as follows: 1—To
switch to Server Core 2—To switch to the GUI 3—To install the GUI from an online
resource Be patient; this process takes a few minutes to complete. Once it has fi
nished, you will be prompted to reboot the server. When the server reboots, you
should be in the version you need. Accessing Task Manager Server Core provides a
few graphical user interfaces. The most important is Task Manager. It’s the same
one you have come to know and love with other Windows versions. There are two
primary ways to open Task Manager: 110 | CHAPTER 3 INTRODUCTION TO SERVER
CORE Ctrl+Alt+Del You can open the trustworthy Security dialog box by pressing
the Ctrl+Alt+Del key combination. On this page, you can opt to lock the
workstation, log out, or start Task Manager. Ctrl+Shift+Esc You can use the “MSCE
secret handshake” method of Ctrl+Shift+Esc to start Task Manager. Now that you
know this, you’re part of an elite club. It was once one of those undocumented
features. Closing the Command Prompt As a good system administrator, you close
applications when you’ve fi nished using them so as not to consume valuable
resources, such as memory and CPU cycles, right? So, you will probably close the
command prompt after completing a task while logged onto Server Core. After
realizing that you just closed your only interface to the OS, you can perform the
following steps to return to the command prompt: . Open Task Manager, as
discussed earlier. . Click File ➢ New Task (Run). This is just like the Run prompt you
fi nd on the Start menu. . Enter cmd and then click OK, as shown in Figure 3.6.