Managing a Server Core installation: Overview
Managing a Server Core installation: Overview
You can manage a server running Server Core installation in the following ways:
Locally and remotely using a command prompt. By using the Windows command-line tools at a command prompt, you can manage servers running a Server Core installation.
Remotely using Terminal Server. By using another computer running Windows, you can use the Terminal Server client to connect to a server running a Server Core installation, and manage it remotely. The shell in the Terminal Server session will be the command prompt.
Remotely using Windows Remote Shell. By using another computer running Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2, you can use Windows Remote Shell to run command-line tools and scripts on a server running a Server Core installation.
Locally or remotely using Windows PowerShell. By using Windows PowerShell locally on a computer running a Server Core installation of Windows Server 2008 R2 or remotely from a computer running Windows Server 2008 R2, you can connect to a server running a Server Core installation in the same way that you would connect to any computer running Windows.
Remotely using an MMC snap-in. By using an MMC snap-in from a computer running Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2, you can connect to a server running Server Core installation in the same way that you would connect to any computer running Windows.
Remotely using Server Manager. By using Server Manager from a computer running Windows Server 2008 R2 you can connect to a server running a Server Core installation of Windows Server 2008 R2 and manage it.
Prerequisites for managing a server running Server Core installation
To manage a server running Server Core installation, you need:
A computer that has a Server Core installation of Windows Server 2008 or Windows Server 2008 R2 installed and configured.
An administrator user account and password for a server running a Server Core installation.
Known issues for managing a server running a Server Core installation
Not all tasks can be performed at a command prompt or remotely through an MMC snap-in. There is a script included with the Server Core installation of Windows Server 2008 that you can use to configure the following settings:
Enable automatic updates
Enable Remote Desktop for Administration
Enable Terminal Server clients on previous versions of Windows to connect to a server running a Server Core installation
Configure DNS SRV record weight and priority
Manage IPsec Monitor remotely
The script is located in the \Windows\System32 folder of a server running a Server Core installation. At a command prompt, open the folder, and then use the following command to display the usage instructions for the previous options:
cscript scregedit.wsf /?
Note
You can use this command with the /cli option to display a list of common command-line tools and their usage.
If you close all Command Prompt windows and want to open a new Command Prompt window, press CTRL+ALT+DELETE, click Start Task Manager, click File, click Run, and then type cmd.exe. Alternatively, you can log off and log back on.
Any command or tool that attempts to launch Windows Explorer will not work. For example, start . used from a command prompt will not work.
There is no support for HTML rendering or HTML help in Server Core installations.
Server Core installations do not support running managed code. Any management tools and utilities that run locally on a server running a Server Core installation must be written in native Win32 code.
Server Core installations do not generate any notifications for activation, new updates, or password expiration because these notifications require the Windows Explorer shell, which is not part of the Server Core installation.
If you need to write a script for managing a server running a Server Core installation, which requires the secure inclusion of an administrative password, see the scripting column on Microsoft TechNet (https://go.microsoft.com/fwlink/?LinkID=56421).
Server Core installations support Windows Installer in quiet mode so that you can install tools and utilities from Windows Installer files.
Windows Firewall can be configured at a command prompt by using netsh advfirewall.
When installing Windows Installer packages on a server running a Server Core installation, use the /qb option to display the basic user interface.
To change the time zone on a computer running a Server Core installation of Windows Server 2008, run control timedate.cpl.
To change international settings on a computer running a Server Core installation of Windows Server 2008, run control intl.cpl.
Control.exe will not run on its own. You must run it with either Timedate.cpl or Intl.cpl.
Winver.exe is not available in Server Core installations. To obtain version information use Systeminfo.exe.
Steps for managing a Server Core installation
The following procedures explain methods for managing a server running a Server Core installation, including:
Managing a server running a Server Core installation locally at a command prompt
Managing a server running a Server Core installation remotely at a command prompt
Managing a server running a Server Core installation by using Windows Remote Shell
Managing a server running a Server Core installation by using Microsoft Management Console (MMC)
Adding hardware to a server running a Server Core installation
Obtaining a list of drivers installed on a server running a Server Core installation
To manage a server running a Server Core installation locally at a command prompt
Start a server running a Server Core installation.
Log on using an administrator account.
At the command prompt, use the appropriate command-line tool for the task you want to complete.
Note
For more information about command-line tools, see "Steps for administering a Server Core installation" later in this document.
You can find further information at the Command-Line Reference A-Z (https://go.microsoft.com/fwlink/?LinkId=20331).
To manage a server running a Server Core installation by using a terminal server
On the server running a Server Core installation, type the following command at a command prompt:
cscript C:\Windows\System32\Scregedit.wsf /ar 0
This enables the Remote Desktop for Administration mode to accept connections.
On another computer, click Start, click Run, type mstsc, and then click OK.
In Computer, enter the name of the server running a Server Core installation, and click Connect.
Log on using an administrator account.
When the command prompt appears, you can manage the computer using the Windows command-line tools.
When you have finished remotely managing the computer, type logoff in the command prompt to end your Terminal Server session.
Note
If you are running the Terminal Services client on a previous version of Windows, you must turn off the higher security level that is set by default in Windows Server 2008. To do this, after step 1, type the following command at the command prompt:
cscript C:\Windows\System32\Scregedit.wsf /cs 0
Note
For more information about command-line tools, see "Steps for administering a Server Core installation" later in this document.
You can find further information at the Command-Line Reference A-Z (https://go.microsoft.com/fwlink/?LinkId=20331).
Often it is useful to run Cmd.exe in a Command Prompt window on your local computer, rather than in the Terminal Services client. To do this, you need a standard Windows Server 2008 installation and the latest Terminal Services client.
To use TS RemoteApp to publish Cmd.exe to your local computer
Add the Terminal Services administration tools to the computer running Windows Server 2008 or Windows Server 2008 R2 using Server Manager.
Start MMC on the computer running Windows Server 2008 or Windows Server 2008 R2, add the TS RemoteApp Manager snap-in, and then connect the snap-in to a server running a Server Core installation.
In the Results pane of the snap-in, click RemoteApp Programs, and then navigate to \\<ServerName>\c$\windows\system32\cmd.exe (where ServerName is the name of the server running a Server Core installation).
In the Allow list, click Remote cmd.exe, and then click Create RDP package.
Connect to the server running a Server Core installation by using the Remote Desktop Protocol package.
To manage a server running a Server Core installation by using the Windows Remote Shell
To enable Windows Remote Shell on a server running a Server Core installation, type the following command at a command prompt:
WinRM quickconfig
On another computer, at a command prompt, use WinRS.exe to run commands on a server running a Server Core installation. For example, to perform a directory listing of the Windows folder, type:
winrs -r:<ServerName> dir c:\windows
Where:
ServerName is the name of the server running a Server Core installation.
Note
The WinRM quickconfig setting enables a server running a Server Core installation to accept Windows Remote Shell connections. This setting can also be set in an unattend file. See the example in Appendix A at the end of this document.
Important
For more information about using different security credentials to run commands, see the command-line help for WinRS.exe by typing winrs -? at a command prompt.
To manage a server that is running a Server Core installation and is a domain member using an MMC snap-in
Start an MMC snap-in, such as Computer Management.
In the left pane, right-click the top of the tree and click Connect to another computer. (In the Computer Management example, you would right-click Computer Management (Local).)
In Another computer, type the computer name of the server running a Server Core installation and click OK.
You can now use the MMC snap-in to manage the server running a Server Core installation as you would any other computer running a Windows Server operating system.
To manage a server that is running a Server Core installation and is not a domain member using an MMC snap-in
If the server running a Server Core installation is not a member of a domain, establish alternate credentials to use to connect to the Server Core installation by typing the following command at a command prompt on your client computer:
cmdkey /add:<ServerName> /user:<UserName> /pass:<password>
Where:
ServerName is the name of the server running a Server Core installation.
UserName is the name of an administrator account.
To be prompted for a password, omit the /pass option.
When prompted, type the password for the user name that is specified in the previous step.
If the firewall on the computer running a Server Core installation is not already configured to allow MMC snap-ins to connect, follow the steps in "To configure Windows Firewall to allow MMC snap-in(s) to connect." Then return to this procedure.
On a different computer, start an MMC snap-in, such as Computer Management.
In the left pane, right-click the top of the tree and click Connect to another computer. (In the Computer Management example, you would right-click Computer Management (Local).)
In Another computer, type the computer name of the server running a Server Core installation and click OK.
You can now use the MMC snap-in to manage the server running a Server Core installation as you would any other computer running a Windows Server operating system.
To configure Windows Firewall to allow MMC snap-in(s) to connect
To allow all MMC snap-ins to connect, at a command prompt, type:
Netsh advfirewall firewall set rule group=“remote administration” new enable=yes
To allow only specific MMC snap-ins to connect, at a command prompt, type:
Netsh advfirewall firewall set rule group=“<rulegroup>” new enable=yes
Where:
Rulegroup is one of the values from the table below, depending on which snap-in you want to connect.
MMC snap-in | Rule group |
---|---|
Event Viewer |
Remote Event Log Management |
Services |
Remote Services Management |
Shared Folders |
File and Printer Sharing |
Task Scheduler |
Remote Scheduled Tasks Management |
Reliability and Performance |
|
Disk Management |
Remote Volume Management |
Windows Firewall with Advanced Security |
Windows Firewall Remote Management |
Note
Some MMC snap-ins do not have a corresponding rule group that allows them to connect through the firewall. However, enabling the rule groups for Event Viewer, Services, or Shared Folders will allow most other snap-ins to connect.
Additionally, certain snap-ins require further configuration before they can connect through the firewall:
Device Manager. You must first enable the Allow remote access to the PnP interface policy setting. To do this, on a computer running Windows Vista or a full installation of Windows Server 2008, open the Local Group Policy Editor MMC snap-in, connect to the computer running a Server Core installation, navigate to Computer Configuration\Administrative Templates\Device Installation, and then enable Allow remote access to the PnP interface. Restart the computer running a Server Core installation.
Note that when Device Manager is used remotely, it is read-only.
Disk Management. You must first start the Virtual Disk Service (VDS) on the computer running a Server Core installation. You must also configure the Disk Management rules appropriately on the computer that is running the MMC snap-in.
IP Security Monitor. You must first enable remote management of this snap-in. To do this, at a command prompt, type:
Cscript \windows\system32\scregedit.wsf /im 1
Reliability and Performance. The snap-in does not require any further configuration, but when you use it to monitor a computer running a Server Core installation, you can only monitor performance data. Reliability data is not available.
To add hardware to a server running a Server Core installation
Follow the instructions provided by the hardware vendor for installing new hardware:
If the driver for the hardware is included in Windows Server 2008 or Windows Server 2008 R2, Plug and Play will start and install the driver.
If the driver for the hardware is not included, proceed with the steps 2 and 3.
Copy the driver files to a temporary folder on the server running a Server Core installation.
At a command prompt, open the folder where the driver files are located, and then run the following command:
pnputil -i -a <driverinf>
Where:
driverinf is the file name of the .inf file for the driver.
If prompted, restart the computer.
To obtain a list of drivers that are installed on the server running a Server Core installation
At a command prompt, type:
sc query type= driver
Note
You must include the space after the equal sign for the command to complete successfully.
To disable a device driver on a server running a Server Core installation
At a command prompt, type:
sc delete <service_name>
Where:
service_name is the name of the service that you obtain by running sc query type= driver.