Managing Servers Running Windows Server 2012

  • 9/15/2012

Installing Windows Server 2012

You can install Windows Server 2012 on new hardware or as an upgrade. When you install Windows Server 2012 on a computer with an existing operating system, you can perform a clean installation or an upgrade. With a clean installation, the Windows Server 2012 Setup program replaces the original operating system on the computer, and all user or application settings are lost. With an upgrade, the Setup program performs a clean installation of the operating system and then migrates user settings, documents, and applications from the earlier version of Windows.

Windows Server 2012 supports only 64-bit architecture. You can install the operating system only on computers with 64-bit processors. Before you install Windows Server 2012, you should be sure that your computer meets the minimum requirements of the edition you plan to use. Microsoft provides both minimum requirements and recommended requirements. If your computer doesn’t meet the minimum requirements, you will not be able to install Windows Server 2012. If your computer doesn’t meet the recommended requirements, you will experience performance issues.

Windows Server 2012 requires at least 10 GB of disk space for installation of the base operating system. Microsoft recommends that a computer running Windows Server 2012 have 32 GB or more of available disk space. Additional disk space is required for paging and dump files as well as for the features, roles, and role services you install. For optimal performance, you should have at least 10 percent of free space on a server’s disks at all times.

When you install Windows Server 2012, the Setup program automatically makes recovery options available on your server as an advanced boot option. In addition to a command line for troubleshooting and options for changing the startup behavior, you can use System Image Recovery to perform a full recovery of the computer using a system image created previously. If other troubleshooting techniques fail to restore the computer and you have a system image for recovery, you can use this feature to restore the computer from the backup image.

Performing a Clean Installation

Before you start an installation, you need to consider whether you want to manage the computer’s drives and partitions during the setup process. If you want to use the advanced drive setup options that Setup provides for creating and formatting partitions, you need to boot the computer using the distribution media. If you don’t boot using the distribution media, these options won’t be available, and you’ll only be able to manage disk partitions at a command prompt using the DiskPart utility.

You can perform a clean installation of Windows Server 2012 by following these steps:

  1. Start the Setup program by using one of the following techniques:

    • For a new installation, turn on the computer with the Windows Server 2012 distribution media in the computer’s disc drive, and then press any key when prompted to start Setup from your media. If you are not prompted to boot from the disc drive, you might need to select advanced boot options and then boot from media rather than hard disk, or you might need to change the computer’s firmware settings to allow booting from media.

    • For a clean installation over an existing installation, you can boot from the distribution media, or you can start the computer and log on using an account with administrator privileges. When you insert the Windows Server 2012 distribution media into the computer’s disc drive, Setup should start automatically. If Setup doesn’t start automatically, use File Explorer to access the distribution media and then double-tap or double-click Setup.exe.

  2. If you started the computer using the distribution media, choose your language, time and currency formats, and keyboard layout when prompted. Only one keyboard layout is available during installation. If your keyboard language and the language edition of Windows Server 2012 you are installing are different, you might see unexpected characters as you type. Be sure that you select the correct keyboard language to avoid this. When you are ready to continue with the installation, tap or click Next.

  3. Choose Install Now to start the installation. After Setup copies the temporary files to the computer, choose whether to get updates for Setup during the installation. If you started Setup after logging on to an existing installation of Windows, choose either Go Online To Install Updates Now or No, Thanks.

  4. With volume and enterprise licensed editions of Windows Server 2012, you might not need to provide a product key during installation. With retail editions, however, you need to enter a product key when prompted. Tap or click Next to continue. The Activate Windows When I’m Online check box is selected by default to ensure that you are prompted to activate the operating system the next time you connect to the Internet.

  5. On the Select The Operating System You Want To Install page, options are provided for full-server and Server Core installations. Make the appropriate selection, and then tap or click Next.

  6. The license terms for Windows Server 2012 have changed from previous releases of Windows. After you review the license terms, tap or click I Accept The License Terms, and then tap or click Next.

  7. On the Which Type Of Installation Do You Want page, select the type of installation you want Setup to perform. Because you are performing a clean installation to replace an existing installation or configure a new computer, select Custom Install Windows Only (Advanced) as the installation type. If you started Setup from the boot prompt rather than from Windows itself, the Upgrade option is disabled. To upgrade rather than perform a clean install, you need to restart the computer and boot the currently installed operating system. After you log on, you then need to start the installation.

  8. On the Where Do You Want To Install Windows page, select the disk or disk and partition on which you want to install the operating system. There are two versions of the Where Do You Want To Install Windows page, so you need to keep the following in mind:

    • When a computer has a single hard disk with a single partition encompassing the whole disk or a single area of unallocated space, the whole disk partition is selected by default, and you can tap or click Next to choose this as the install location and continue. With a disk that is completely unallocated, you might want to create the necessary partition before installing the operating system, as discussed in “Creating, Formatting, Deleting, and Extending Disk Partitions During Installation” later in this chapter.

    • When a computer has multiple disks or a single disk with multiple partitions, you need to select an existing partition to use for installing the operating system or create a partition. You can create and manage partitions as discussed in “Creating, Formatting, Deleting, and Extending Disk Partitions During Installation” later in this chapter.

    • If a disk has not been initialized for use or if the firmware of the computer does not support starting the operating system from the selected disk, you need to initialize it by creating one or more partitions on the disk. You cannot select or format a hard disk partition that uses FAT or FAT32 or has other incompatible settings. To work around this issue, you might want to convert the partition to NTFS. When working with this page, you can access a command prompt to perform any necessary preinstallation tasks. See “Creating, Formatting, Deleting, and Extending Disk Partitions During Installation” later in this chapter.

  9. If the partition you select contains a previous Windows installation, Setup provides a prompt stating that existing user and application settings will be moved to a folder named Windows.old and that you must copy these settings to the new installation to use them. Tap or click OK.

  10. Tap or click Next. Setup starts the installation of the operating system. During this procedure, Setup copies the full disk image of Windows Server 2012 to the location you selected and then expands it. Afterward, Setup installs features based on the computer’s configuration and the hardware it detects. This process requires several automatic restarts. When Setup finishes the installation, the operating system will be loaded, and you can perform initial configuration tasks such as setting the administrator password and server name.

Performing an Upgrade Installation

Although Windows Server 2012 provides an upgrade option during installation, an upgrade isn’t what you think it is. With an upgrade, Setup performs a clean installation of the operating system and then migrates user settings, documents, and applications from the earlier version of Windows.

During the migration portion of the upgrade, Setup moves folders and files from the previous installation to a folder named Windows.old. As a result, the previous installation will no longer run.

You can perform an upgrade installation of Windows Server 2012 by following these steps:

  1. Start the computer, and log on using an account with administrator privileges. When you insert the Windows Server 2012 distribution media into the computer’s DVD-ROM drive, Setup should start automatically. If Setup doesn’t start automatically, use File Explorer to access the distribution media and then double-tap or double-click Setup.exe.
  2. Because you are starting Setup from the current operating system, you are not prompted to choose your language, time and currency formats, or keyboard layout and only the current operating system’s keyboard layout is available during installation. If your keyboard language and the language of the edition of Windows Server 2012 you are installing are different, you might see unexpected characters as you type.
  3. Choose Install Now to start the installation. After Setup copies the temporary files to the computer, choose whether to get updates during the installation. Choose either Go Online To Install Updates Now or No, Thanks.
  4. With volume and enterprise licensed editions of Windows Server 2012, you might not need to provide a product key during installation of the operating system. With retail editions, however, you are prompted to enter a product key. Tap or click Next to continue. The Automatically Activate Windows When I’m Online check box is selected by default to ensure that you are prompted to activate the operating system the next time you connect to the Internet.
  5. On the Select The Operating System You Want To Install page, options are provided for full-server and Server Core installations. Make the appropriate selection, and then tap or click Next.
  6. The license terms for Windows Server 2012 have changed from previous releases of Windows. After you review the license terms, tap or click I Accept The License Terms, and then tap or click Next.
  7. On the Which Type Of Installation Do You Want page, you need to select the type of installation you want Setup to perform. Because you are performing a clean installation over an existing installation, select Upgrade. If you started Setup from the boot prompt rather than from Windows itself, the Upgrade option is disabled. To upgrade rather than perform a clean install, you need to restart the computer and boot the currently installed operating system. After you log on, you can start the installation.
  8. Setup will then start the installation. Because you are upgrading the operating system, you do not need to choose an installation location. During this process, Setup copies the full disk image of Windows Server 2012 to the system disk. Afterward, Setup installs features based on the computer’s configuration and the hardware it detects. When Setup finishes the installation, the operating system will be loaded, and you can perform initial configuration tasks such as setting the administrator password and server name.

Performing Additional Administration Tasks During Installation

Sometimes you might forget to perform a preinstallation task prior to starting the installation. Rather than restarting the operating system, you can access a command prompt from Setup or use advanced drive options to perform the necessary administrative tasks.

Using the Command Line During Installation

When you access a command prompt from Setup, you access the MINWINPC (mini Windows PC) environment used by Setup to install the operating system. During installation, on the Where Do You Want To Install Windows page, you can access a command prompt by pressing Shift+F10. As Table 2-4 shows, the mini Windows PC environment gives you access to many of the same command-line tools that are available in a standard installation of Windows Server 2012.

Table 2-4 Command-Line Utilities in the Mini Windows PC Environment

COMMAND

DESCRIPTION

ARP

Displays and modifies the IP-to-physical address translation tables used by the Address Resolution Protocol (ARP).

ASSOC

Displays and modifies file extension associations.

ATTRIB

Displays and changes file attributes.

CALL

Calls a script or script label as a procedure.

CD/CHDIR

Displays the name of or changes the current directory.

CHKDSK

Checks a disk for errors and displays a report.

CHKNTFS

Displays the status of volumes. Sets or excludes volumes from automatic system checking when the computer is started.

CHOICE

Creates a list from which users can select one of several choices in a batch script.

CLS

Clears the console window.

CMD

Starts a new instance of the Windows command shell.

COLOR

Sets the colors of the command-shell window.

CONVERT

Converts FAT volumes to NTFS.

COPY

Copies or combines files.

DATE

Displays or sets the system date.

DEL

Deletes one or more files.

DIR

Displays a list of files and subdirectories within a directory.

DISKPART

Invokes a text-mode command interpreter so that you can manage disks, partitions, and volumes using a separate command prompt and commands that are internal to DISKPART.

DISM

Services and manages Windows images.

DOSKEY

Edits command lines, recalls Windows commands, and creates macros.

ECHO

Displays messages or turns command echoing on or off.

ENDLOCAL

Ends localization of environment changes in a batch file.

ERASE

Deletes one or more files.

EXIT

Exits the command interpreter.

EXPAND

Uncompresses files.

FIND

Searches for a text string in files.

FOR

Runs a specified command for each file in a set of files.

FORMAT

Formats a floppy disk or hard drive.

FTP

Transfers files.

FTYPE

Displays or modifies file types used in file-extension associations.

GOTO

Directs the Windows command interpreter to a labeled line in a script.

HOSTNAME

Prints the computer’s name.

IF

Performs conditional processing in batch programs.

IPCONFIG

Displays TCP/IP configuration.

LABEL

Creates, changes, or deletes the volume label of a disk.

MD/MKDIR

Creates a directory or subdirectory.

MORE

Displays output one screen at a time.

MOUNTVOL

Manages a volume mount point.

MOVE

Moves files from one directory to another directory on the same drive.

NBTSTAT

Displays the status of NetBIOS.

NET ACCOUNTS

Manages user account and password policies.

NET COMPUTER

Adds or removes computers from a domain.

NET CONFIG SERVER

Displays or modifies the configuration of a server service.

NET CONFIG WORKSTATION

Displays or modifies the configuration of a workstation service.

NET CONTINUE

Resumes a paused service.

NET FILE

Displays or manages open files on a server.

NET GROUP

Displays or manages global groups.

NET LOCALGROUP

Displays or manages local group accounts.

NET NAME

Displays or modifies recipients for messenger service messages.

NET PAUSE

Suspends a service.

NET PRINT

Displays or manages print jobs and shared queues.

NET SEND

Sends a messenger service message.

NET SESSION

Lists or disconnects sessions.

NET SHARE

Displays or manages shared printers and directories.

NET START

Lists or starts network services.

NET STATISTICS

Displays workstation and server statistics.

NET STOP

Stops services.

NET TIME

Displays or synchronizes network time.

NET USE

Displays or manages remote connections.

NET USER

Displays or manages local user accounts.

NET VIEW

Displays network resources or computers.

NETSH

Invokes a separate command prompt that allows you to manage the configuration of various network services on local and remote computers.

NETSTAT

Displays the status of network connections.

PATH

Displays or sets a search path for executable files in the current command window.

PATHPING

Traces routes, and provides packet-loss information.

PAUSE

Suspends the processing of a script, and waits for keyboard input.

PING

Determines whether a network connection can be established.

POPD

Changes to the directory stored by PUSHD.

PRINT

Prints a text file.

PROMPT

Modifies the Windows command prompt.

PUSHD

Saves the current directory and then changes to a new directory.

RD/RMDIR

Removes a directory.

RECOVER

Recovers readable information from a bad or defective disk.

REG ADD

Adds a new subkey or entry to the registry.

REG COMPARE

Compares registry subkeys or entries.

REG COPY

Copies a registry entry to a specified key path on a local or remote system.

REG DELETE

Deletes a subkey or entries from the registry.

REG QUERY

Lists the entries under a key and the names of subkeys (if any).

REG RESTORE

Writes saved subkeys and entries back to the registry.

REG SAVE

Saves a copy of specified subkeys, entries, and values to a file.

REGSVR32

Registers and unregisters DLLs.

REM

Adds comments to scripts.

REN

Renames a file.

ROUTE

Manages network routing tables.

SET

Displays or modifies Windows environment variables. Also used to evaluate numeric expressions at the command line.

SETLOCAL

Begins the localization of environment changes in a batch file.

SFC

Scans and verifies protected system files.

SHIFT

Shifts the position of replaceable parameters in scripts.

START

Starts a new command-shell window to run a specified program or command.

SUBST

Maps a path to a drive letter.

TIME

Displays or sets the system time.

TITLE

Sets the title for the command-shell window.

TRACERT

Displays the path between computers.

TYPE

Displays the contents of a text file.

VER

Displays the Windows version.

VERIFY

Tells Windows whether to verify that your files are written correctly to a disk.

VOL

Displays a disk volume label and serial number.

Forcing Disk Partition Removal During Installation

During installation, you might be unable to select the hard disk you want to use. This issue can arise if the hard-disk partition contains an invalid byte offset value. To resolve this issue, you need to remove the partitions on the hard disk (which destroys all associated data) and then create the necessary partition using the advanced options in the Setup program. During installation, on the Where Do You Want To Install Windows page, you can remove unrecognized hard-disk partitions by following these steps:

  1. Press Shift+F10 to open a command prompt.
  2. At the command prompt, type diskpart. This starts the DiskPart utility.
  3. To view a list of disks on the computer, type list disk.
  4. Select a disk by typing select disk DiskNumber, where DiskNumber is the number of the disk you want to work with.
  5. To permanently remove the partitions on the selected disk, type clean.
  6. When the cleaning process is finished, type exit to exit the DiskPart utility.
  7. Type exit to exit the command prompt.
  8. In the Install Windows dialog box, tap or click the back arrow button to return to the previous window.
  9. On the Which Type Of Installation Do You Want page, tap or click Custom (Advanced) to start a custom install.
  10. On the Where Do You Want To Install Windows page, tap or click the disk you previously cleaned to select it as the installation partition. As necessary, tap or click the Disk Options link to display the Delete, Format, New, and Extend partition configuration options.
  11. Tap or click New. In the Size box, set the size of the partition in megabytes, and then tap or click Apply.

Loading Disk Device Drivers During Installation

During installation, on the Where Do You Want To Install Windows page, you can use the Load Driver option to load the device drivers for a hard-disk drive or a hard-disk controller. Typically, you use this option when a disk drive you want to use for installing the operating system isn’t available for selection because the device drivers aren’t available.

To load the device drivers and make the hard disk available, follow these steps:

  1. During installation, on the Where Do You Want To Install Windows page, tap or click Load Driver.

  2. When prompted, insert the installation media into a DVD drive or USB flash drive, and then tap or click OK. Setup then searches the computer’s removable media drives for the device drivers.

    • If Setup finds multiple device drivers, select the driver to install and then tap or click Next.

    • If Setup doesn’t find the device driver, tap or click Browse to use the Browse For Folder dialog box to select the device driver to load, tap or click OK, and then tap or click Next.

You can tap or click the Rescan button to have Setup rescan the computer’s removable media drives for the device drivers. If you are unable to install a device driver successfully, tap or click the back arrow button in the upper-left corner of the Install Windows dialog box to go back to the previous page.

Creating, Formatting, Deleting, and Extending Disk Partitions During Installation

When you are performing a clean installation and have started the computer from the distribution media, the Where Do You Want To Install Windows page has additional options. You can display these options by tapping or clicking Drive Options (Advanced). These additional options are used as follows:

  • New Creates a partition. You must then format the partition.
  • Format Formats a new partition so that you can use it for installing the operating system.
  • Delete Deletes a partition that is no longer wanted.
  • Extend Extends a partition to increase its size.

The sections that follow discuss how to use each of these options. If these options aren’t available, you can still work with the computer’s disks. On the Where Do You Want To Install Windows page, press Shift+F10 to open a command prompt. At the command prompt, type diskpart to start the DiskPart utility.

Creating Disk Partitions During Installation

Creating a partition allows you to set the partition’s size. Because you can create new partitions only in areas of unallocated space on a disk, you might need to delete existing partitions to be able to create a partition of the size you want. Once you create a partition, you can format the partition so that you can use it to install a file system. If you don’t format a partition, you can still use it for installing the operating system. In this case, Setup formats the partition when you continue installing the operating system.

You can create a new partition by following these steps:

  1. During installation, on the Where Do You Want To Install Windows page, tap or click Drive Options (Advanced) to display the advanced options for working with drives.
  2. Tap or click the disk on which you want to create the partition, and then tap or click New.
  3. In the Size box, set the size of the partition in megabytes and then tap or click Apply to have Setup create a partition on the selected disk.

After you create a partition, you need to format the partition to continue with the installation.

Formatting Disk Partitions During Installation

Formatting a partition creates a file system on the partition. When formatting is complete, you have a formatted partition on which you can install the operating system. Keep in mind that formatting a partition destroys all data on the partition. You should format existing partitions (rather than ones you just created) only when you want to remove an existing partition and all its contents so that you can start the installation from a freshly formatted partition.

You can format a partition by following these steps:

  1. During installation, on the Where Do You Want To Install Windows page, tap or click Drive Options (Advanced) to display the advanced options for working with drives.
  2. Tap or click the partition that you want to format.
  3. Tap or click Format. When prompted to confirm that you want to format the partition, tap or click OK. Setup then formats the partition.

Deleting Disk Partitions During Installation

Deleting a partition removes a partition you no longer want or need. When Setup finishes deleting the partition, the disk space previously allocated to the partition becomes unallocated space on the disk. Deleting the partition destroys all data on the partition. Typically, you need to delete a partition only when it is in the wrong format or when you want to combine areas of free space on a disk.

You can delete a partition by following these steps:

  1. During installation, on the Where Do You Want To Install Windows page, tap or click Drive Options (Advanced) to display the advanced options for working with drives.
  2. Tap or click the partition you want to delete.
  3. Tap or click Delete. When prompted to confirm that you want to delete the partition, tap or click OK. Setup then deletes the partition.

Extending Disk Partitions During Installation

Windows Server 2012 requires at least 10 GB of disk space for installation, and at least 32 GB of available disk space is recommended. If an existing partition is too small, you won’t be able to use it to install the operating system. To resolve this, you can extend a partition to increase its size by using areas of unallocated space on the current disk. You can extend a partition with an existing file system only if it is formatted with NTFS 5.2 or later. New partitions created in Setup can be extended as well, provided that the disk on which you create the partition has unallocated space.

You can extend a partition by following these steps:

  1. During installation, on the Where Do You Want To Install Windows page, tap or click Drive Options (Advanced) to display the advanced options for working with drives.
  2. Tap or click the partition you want to extend.
  3. Tap or click Extend. In the Size box, set the size of the partition in megabytes and then tap or click Apply to extend the selected partition.
  4. When prompted to confirm that you want to extend the partition, tap or click OK. Setup then extends the partition.

Changing the Installation Type

Unlike earlier releases of Windows Server, you can change the installation type of any server running Windows Server 2012. This is possible because a key difference between the installation types relates to whether the installation has the following User Interfaces and Infrastructure features:

  • Graphical Management Tools And Infrastructure
  • Desktop Experience
  • Server Graphical Shell

Full-server installations have both the Graphical Management Tools And Infrastructure feature and the Server Graphical Shell feature. They also might have Desktop Experience. On the other hand, minimal-interface installations have only the Graphical Management Tools And Infrastructure feature and Server Core installations have none of these features.

Knowing that Windows also automatically installs or uninstalls dependent features, server roles, and management tools to match the installation type, you can convert from one installation type to another simply by adding or removing the appropriate User Interfaces and Infrastructure features.

Converting Full-Server and Minimal-Interface Installations

To convert a full-server installation to a minimal-interface installation, you remove the Server Graphical Shell. Although you can use the Remove Roles And Features Wizard to do this, you also can do this at a PowerShell prompt by entering the following command:

uninstall-windowsfeature server-gui-shell -restart

This command instructs Windows Server to uninstall the Server Graphical Shell and restart the server to finalize the removal. If Desktop Experience also is installed, this feature will be removed as well.

To convert a minimal-interface installation to a full-server installation, you add the Server Graphical Shell. You can use the Add Roles And Features Wizard to do this, or you can enter the following command at a PowerShell prompt:

install-windowsfeature server-gui-shell -restart

This command instructs Windows Server to install the Server Graphical Shell and restart the server to finalize the installation. If you also want to install the Desktop Experience, you can use this command instead:

install-windowsfeature server-gui-shell, desktop-experience -restart

Converting Server Core Installations

To convert a full-server or minimal-interface installation to a Server Core installation, you remove the user interfaces for Graphical Management Tools And Infrastructure. If you remove the WoW64 Support framework, you also convert the server to a Server Core installation. Although you can use the Remove Roles And Features Wizard to remove the user interfaces, you also can do this at a PowerShell prompt by entering the following command:

uninstall-windowsfeature server-gui-mgmt-infra -restart

This command instructs Windows Server to uninstall the user interfaces for Graphical Management Tools And Infrastructure and restart the server to finalize the removal. Because many dependent roles, role services, and features might be uninstalled along with the user interfaces, run the command with the –Whatif parameter first to get details on what exactly will be uninstalled.

If you installed the server with the user interfaces and converted it to a Server Core installation, you can revert back to a full-server installation with the following command:

install-windowsfeature server-gui-mgmt-infra -restart

As long as the binaries for this feature and any dependent features haven’t been removed, the command should succeed. If the binaries were removed, however, or Server Core was the original installation type, you need to specify a source for the required binaries.

You use the –Source parameter to restore required binaries from a Windows Imaging (WIM) mount point. For example, if your enterprise has a mounted Windows Image for the edition of Windows Server 2012 you are working with available at the network path \\ImServer18\WinS12EE, you could specify the source as follows:

install-windowsfeature server-gui-mgmt-infra -source \\imserver18\wins12ee

While many large enterprises might have standard images that can be mounted using network paths, you also can mount the Windows Server 2012 distribution media and then use the Windows\WinSXS folder from the installation image as your source. To do this, follow these steps:

  1. Insert the installation disc into the server’s disc drive, and then create a folder to mount the Installation image by entering the following command: mkdir c:\mountdir.

  2. Locate the index number of the image you want to use by entering the following command at an elevated prompt: dism /get-wiminfo /wimfile:e:\sources\install.wim, where e: is the drive designator of the server’s disc drive.

  3. Mount the installation image by entering the following command at an elevated prompt: dism /mount-wim /wimfile:e:\sources\install.wim /index:2 /mountdir:c:\mountdir /readonly, where e: is the drive designator of the server’s disc drive, 2 is the index of the image to use, and c:\mountdir is the mount directory. Mounting the image might take several minutes.

  4. Use Install-WindowsFeature at a PowerShell prompt with the source specified as c:\mountdir\windows\winsxs, as shown in this example:

    install-windowsfeature server-gui-mgmt-infra
    -source c:\mountdir\windows\winsxs