Export (0) Print
Expand All

Overview of Server Manager Commands

Server Manager in Windows Server® 2008 offers a command-line tool, ServerManagerCmd.exe, to enable users to perform automated installations or removals of roles, role services, and features. ServerManagerCmd.exe options enable users to view logs of its operations and to run queries to display lists of roles, role services, and features that are both installed and available for installation on a computer.

ServerManagerCmd.exe can be used with an XML answer file to expedite repetitive automated installations or removals of roles or features. For more information about the answer file that you can use with ServerManagerCmd.exe, see Creating an Answer File for Server Manager Commands.

The ServerManagerCmd.exe command

The Server Manager command-line installation accepts parameters to install or to remove one role, role service, and feature per command instance. When you want to install or to remove more than one role, role service, or feature on a server by using a single command instance, use an XML answer file. For more information about the answer file that you can use with ServerManagerCmd.exe, see Creating an Answer File for Server Manager Commands.

noteNote
ServerManagerCmd.exe can be executed from within any directory on the server's local drives. You must be a member of the Administrators group on the server on which you intend to install or to remove software.
ImportantImportant
Because of security restrictions imposed by User Account Control, you must run ServerManagerCmd.exe in a Command Prompt window opened with elevated privileges. To do this, right-click the Command Prompt executable file, or the Command Prompt object on the Start menu, and then click Run as administrator.

Syntax

ServerManagerCmd.exe -query [<query.xml>] [-logPath <log.txt>]

ServerManagerCmd.exe -inputPath <answer.xml> [-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]

ServerManagerCmd.exe -install <command-Id> [-setting <setting-name>=<setting value>][-allSubFeatures] [-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]

ServerManagerCmd.exe -remove <command-Id> [-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]

ServerManagerCmd.exe [-help | -?]

ServerManagerCmd.exe -version

Parameters

 

Parameter Description

-query [<query.xml>] [-logPath <log.txt>]

Displays a list of all roles, role services, or features installed and available for installation on the server. You can also use the short form of this parameter, -q.

To save the query results to an XML file, specify an XML file to replace query.xml.

You can also set the following option:

-logPath <log.txt>

Specifies a name and a location for the log file, other than the default, %WINDIR%\temp\servermanager.log.

-inputPath <answer.xml>

Installs or removes the roles, role services, or features specified in the answer file, an XML file represented by answer.xml. You can also use the short form of this parameter, -p, instead of -inputPath.

For more information about creating an answer file for use with this parameter, see Creating an Answer File for Server Manager Commands.

You can also set the following options:

-resultPath <result.xml>

Saves installation results to an XML file represented by result.xml. You can also use the short form of this parameter, -r. You cannot use the -resultPath and the -whatIf in the same instance of ServerManagerCmd.exe.

-restart

Added to the -install option, restarts the computer automatically when installation is complete, if restarting is required by the roles or the features installed.

-whatIf

Displays any operations specified for the -install option. You can also use the short form of the -whatIf parameter, -w. You cannot use the -resultPath parameter and the -whatIf parameter in the same instance of ServerManagerCmd.exe.

-logPath <log.txt>

Specifies a name and a location for the log file, other than the default, %WINDIR%\temp\servermanager.log.

-install <Id>

Installs the role, role service, or feature specified by Id. See "Role, role service, and feature command identifiers" in this topic for a complete list of the role, role service, or feature identifiers from which you can choose to specify for Id. The identifiers are not case-sensitive.

Multiple roles, role services, and features can be installed simultaneously.

You can also set the following options:

-setting <setting name>=<setting value>

Specifies required settings for the installation. See "Role, role service, and feature command identifiers" in this topic for a complete list of available settings. This parameter can be specified multiple times so that multiple roles, role services, and features can be installed simultaneously.

-allSubFeatures

Specifies the installation of all subordinate services and features along with the parent role, role service, or feature named in the -install command's Id parameter.

noteNote
Note that some role containers do not have a command line identifier to enable the installation of all role services. This is the case when role services cannot be installed in the same instance of the Server Manager command. For example, the Federation Service role service of Active Directory Federation Services and the Federation Service Proxy role service cannot be installed by using the same Server Manager command instance.

-resultPath <result.xml>

Saves installation results to an XML file represented by result.xml. You can also use the short form of this parameter, -r. You cannot use the -resultPath parameter and the -whatIf parameter in the same instance of ServerManagerCmd.exe.

-restart

Added to the -install command, restarts the computer automatically when installation is complete, if restarting is required by the roles or features installed.

-whatIf

Displays any operations specified for the -install command. You can also use the short form of the -whatIf parameter, -w. You cannot use the -resultPath parameter and the -whatIf parameter in the same instance of ServerManagerCmd.exe.

-logPath <log.txt>

Uses -logPath to specify a name and a location for the log file, other than the default, %WINDIR%\Temp\Servermanager.log.

-remove <Id>

Removes the role, role service, or feature specified by Id. See "Role, role service, and feature command identifiers" in this topic for a complete list of the role, role service, and feature identifiers from which you can choose to specify for Id. The identifiers are not case-sensitive.

You can also set the following options:

-resultPath <result.xml>

Saves installation results to an XML file that is represented by result.xml. You can also use the short form of this parameter, -r. You cannot use the -resultPath parameter and the -whatIf parameter in the same instance of ServerManagerCmd.exe.

-restart

Added to the -install command, restarts the computer automatically when installation is complete, if restarting is required by the roles or features installed.

-whatIf

Displays any operations specified for the -install command. You can also use the short form of the -whatIf parameter, -w. You cannot use the -resultPath parameter and the -whatIf parameter in the same instance of ServerManagerCmd.exe.

-logPath <log.txt>

Specifies a name and a location for the log file, other than the default, %WINDIR%\Temp\Servermanager.log.

-help

Displays Help for ServerManagerCmd.exe in the command window. You can also use the short form, -?.

-version

Displays the Server Manager version number. You can also use the short form, -v.

Role, role service, and feature command identifiers

The tables in this section match roles, role services, or features available in Windows Server 2008 with the command identifiers you must use with ServerManagerCmd.exe to install or to remove them.

Role and Role Service command identifiers

 

Role and Role Service command identifiers Command value Notes

DHCP Server

DHCP

The DHCP Server role should be installed with default settings.

Print Services

  • Print Server
  • Internet Printing
  • LPD Service

Print-Server

  • Print-Services
  • Print-Internet
  • Print-LPD-Service

During removal of this role in the Server Manager user interface (UI), you are prompted to delete instances of printers configured on the server. By default, these instances are preserved, which is the default behavior of command-line removal of the Print Services role.

Terminal Services

  • Terminal Server
  • TS Licensing
  • TS Gateway
  • TS Web Access
  • TS Session Broker

Terminal-Services

  • TS-Terminal-Server
  • TS-Licensing
  • TS-Gateway
  • TS-Web-Access
  • TS-Session-Broker

Because Terminal Services settings can be configured after installing the role, you are not required to specify Terminal Services settings in the command-line answer file.

Active Directory Domain Services

  • Active Directory Domain Controller
  • Identity Management for UNIX
  • Server for Network Information Service
  • Password Synchronization

(No command)

  • ADDS-Domain-Controller
  • ADDS-Identity-Management
  • ADDS-NIS
  • ADDS-Password-Sync

After installing Active Directory Domain Services (AD DS), you must run the dcpromo command to promote the server to a domain controller.

Removing the AD DS role while the computer is operating as a domain controller fails. You must first demote the domain controller to a standard domain member.

DNS Server

DNS

None

File Services

  • Distributed File System (DFS)
  • DFS Namespace
  • DFS Replication
  • File Server Resource Manager
  • Services for Network File System
  • Windows Search Service
  • Windows Server 2003 File Services
  • File Replication Service
  • Indexing Service

(No command)

  • FS-DFS
  • FS-DFS-Namespace
  • FS-DFS-Replication
  • FS-Resource-Manager
  • FS-NFS-Services
  • FS-Search-Service
  • FS-Win2003-Services
  • FS-Replication
  • FS-Indexing-Service

You cannot install or remove the File Services container by using the Server Manager command line. You can install or remove the File Services container only by using the Server Manager UI. Note that, for this reason, there is no command ID available to represent the File Services container.

Because you can configure File Services settings after installing the role, you are not required to specify File Services settings in the Server Manager command-line answer file.

Note that Services for Network File system is not part of the File Services role on computers running Windows Server® 2008 for Itanium-Based Systems.

Web Server (IIS)

  • Internet Information Services
  • Common HTTP Features
  • Static Content
  • Default Document
  • Directory Browsing
  • HTTP Errors
  • HTTP Redirection
  • Application Development
  • ASP.NET
  • .NET Extensibility
  • ASP
  • CGI
  • ISAPI Extensions
  • ISAPI Filters
  • Server Side Includes
  • Health and Diagnostics
  • HTTP Logging
  • Logging Tools
  • Request Monitor
  • Tracing
  • Custom Logging
  • ODBC Logging
  • Security
  • Basic Authentication
  • Windows Authentication
  • Digest Authentication
  • Client Certificate Mapping Authentication
  • IIS Client Certificate Mapping Authentication
  • URL Authorization
  • Request Filtering
  • IP and Domain Restrictions
  • Performance
  • Static Content Compression
  • Dynamic Content Compression
  • Management Tools
  • IIS Management Console
  • IIS Management Scripts and Tools
  • Management Service
  • IIS 6 Management Compatibility
  • IIS 6 Metabase Compatibility
  • IIS 6 WMI Compatibility
  • IIS 6 Scripting Tools
  • IIS 6 Management Console
  • FTP Publishing Service
  • FTP Server
  • FTP Management Console

Web-Server

  • Web-WebServer
  • Web-Common-Http
  • Web-Static-Content
  • Web-Default-Doc
  • Web-Dir-Browsing
  • Web-Http-Errors
  • Web-Http-Redirect
  • Web-App-Development
  • Web-Asp-Net
  • Web-Net-Ext
  • Web-ASP
  • Web-CGI
  • Web-ISAPI-Ext
  • Web-ISAPI-Filter
  • Web-Includes
  • Web-Health
  • Web-Http-Logging
  • Web-Log-Libraries
  • Web-Request-Monitor
  • Web-Http-Tracing
  • Web-Custom-Logging
  • Web-ODBC-Logging
  • Web-Security
  • Web-Basic-Auth
  • Web-Windows-Auth
  • Web-Digest-Auth
  • Web-Client-Auth
  • Web-Cert-Auth
  • Web-Url-Auth
  • Web-Filtering
  • Web-IP-Security
  • Web-Performance
  • Web-Stat-Compression
  • Web-Dyn-Compression
  • Web-Mgmt-Tools
  • Web-Mgmt-Console
  • Web-Scripting-Tools
  • Web-Mgmt-Service
  • Web-Mgmt-Compat
  • Web-Metabase
  • Web-WMI
  • Web-Lgcy-Scripting
  • Web-Lgcy-Mgmt-Console
  • Web-Ftp-Publishing
  • Web-Ftp-Server
  • Web-Ftp-Mgmt-Console

None

Active Directory Federation Services

  • Federation Service
  • Federation Service Proxy
  • Web Agents
  • Claims-aware Agent
  • Windows Token-based Agent

(No command)

  • ADFS-Federation
  • ADFS-Proxy
  • ADFS-Web-Agents
  • ADFS-Claims
  • ADFS-Windows-Token

Active Directory Federation Services should be installed with default settings.

Active Directory Lightweight Directory Services

ADLDS

None

Application Server

  • Application Server Core
  • Web Server Support
  • COM+ Network Access
  • TCP Port Sharing
  • Windows Process Activation Service Support
  • HTTP Activation
  • Message Queuing Activation
  • TCP Activation
  • Named Pipes Activation
  • Distributed Transaction Support
  • Incoming Remote Transactions
  • Outgoing Remote Transactions
  • WS-Atomic Transaction Support

Application-Server

  • AS-AppServer-Core
  • AS-Web-Support
  • AS-Ent-Services
  • AS-TCP-Port-Sharing
  • AS-WAS-Support
  • AS-HTTP-Activation
  • AS-MSMQ-Activation
  • AS-TCP-Activation
  • AS-Named-Pipes
  • AS-Dist-Transaction
  • AS-Incoming-Trans
  • AS-Outgoing-Trans
  • AS-WS-Atomic

If you install the WS-Atomic Transaction Support role service, you should also configure it to use a self-signed certificate.

Active Directory Certificate Services

  • Certification Authority
  • Certification Authority Web Enrollment (not installable by using the command line)
  • Online Certificate Status Protocol
  • Microsoft Simple Certificate Enrollment Protocol (not installable by using the command line)

(No command)

  • ADCS-Cert-Authority
  • AD-Certificate
  • ADCS-Online-Cert

Certification Authority and Online Certificate Status Protocol can be installed by using the Server Manager command-line interface. Other role services for Active Directory Certificate Services cannot be installed by using the Server Manager command line.

Fax Server

Fax

Fax Server should be installed with default settings.

Network Policy and Access Services

  • Network Policy Server
  • NPAS Routing and Remote Access Services
  • Remote Access Service
  • Routing
  • Health Registration Authority

NPAS

  • NPAS-Policy-Server
  • NPAS-RRAS-Services
  • NPAS-RRAS
  • NPAS-Routing
  • NPAS-Health

Because Network Policy and Access Services settings can be configured after installing the role, you are not required to specify Network Policy and Access Services settings in the command-line answer file.

Active Directory Rights Management Services (AD RMS)

  • Rights Management Server

Active Directory Rights Management Services (AD RMS) cannot be installed by using the Server Manager command line.

None

UDDI Services

  • UDDI Services Web Application
  • UDDI Services Database

UDDI Services is not installable by using the Server Manager command line.

You cannot install UDDI Services by using the Server Manager command-line because complex database settings are required during UDDI Services setup.

Windows Deployment Services

WDS

None

Feature command identifiers

 

Features Command Value Notes

Failover Clustering

Failover-Clustering

 

Network Load Balancing

NLB

 

Desktop Experience

Desktop-Experience

 

.NET Framework 3.0 Features

  • .NET Framework 3.0
  • XPS Viewer
  • Windows Communication Foundation Activation Components
  • HTTP Activation
  • Non-HTTP Activation

NET-Framework

  • NET-Framework-Core
  • NET-XPS-Viewer
  • NET-Win-CFAC
  • NET-HTTP-Activation
  • NET-Non-HTTP-Activ

Note that the command-line syntax for .NET Framework 3.0 Features does not contain the "." character before NET.

Windows System Resource Manager

WSRM

 

Wireless Networking

Wireless-Networking

 

Windows Server Backup

Backup

 

WINS Server

WINS-Server

 

Remote Assistance

Remote-Assistance

 

Simple TCP/IP Services

Simple-TCPIP

 

Telnet Client

Telnet-Client

 

Telnet Server

Telnet-Server

 

Subsystem for UNIX-based Applications

Subsystem-UNIX-Apps

 

RPC over HTTP Proxy

RPC-over-HTTP-Proxy

 

SMTP Server

SMTP-Server

 

LPR Port Monitor

LPR-Port-Monitor

 

Storage Manager for SANs

Storage-Mgr-SANS

 

BITS Server Extensions

BITS

 

Message Queuing

  • Message Queuing Services
  • Message Queuing Server
  • Directory Service Integration
  • Message Queuing Triggers
  • HTTP Support
  • Multicasting Support
  • Routing Service
  • Windows 2000 Client Support
  • Messaging Queue DCOM Proxy

MSMQ

  • MSMQ-Services
  • MSMQ-Server
  • MSMQ-Directory
  • MSMQ-Triggers
  • MSMQ-HTTP-Support
  • MSMQ-Multicasting
  • MSMQ-Routing
  • MSMQ-Win2000
  • MSMQ-DCOM
 

Windows Process Activation Service

  • Process Model
  • .NET Environment
  • Configuration APIs

WAS

  • WAS-Process-Model
  • WAS-NET-Environment
  • WAS-Config-APIs
 

Windows Internal Database

Windows-Internal-DB

 

BitLocker Drive Encryption

BitLocker

 

Multipath I/O

Multipath-IO

 

Internet Storage Naming Server

ISNS

 

Removable Storage

Removable-Storage

 

TFTP Client

TFTP-Client

 

SNMP Services

  • SNMP Service
  • SNMP WMI Provider

SNMP-Services

  • SNMP-Service
  • SNMP-WMI-Provider
 

Services for Network File System

NFS-Services

Services for Network File System is only available as a feature on computers running Windows Server® 2008 for Itanium-Based Systems.

Internet Printing Client

Internet-Print-Client

 

Peer Name Resolution Protocol

PNRP

 

Connection Manager Administration Kit

CMAK

 

Remote Server Administration Tools

  • Role administration tools
  • Active Directory Certificate Services
  • Web Server (IIS)
  • Terminal Services
  • TS RemoteApp
  • TS Gateway
  • TS Licensing
  • Feature administration tools
  • Failover Clustering
  • Network Load Balancing

RSAT

  • RSAT-Role-Tools
  • RSAT-ADCS
  • RSAT-Web-Server
  • RSAT-TS
  • RSAT-TS-RemoteApp
  • RSAT-TS-Gateway
  • RSAT-TS-Licensing
  • RSAT-Feature-Tools
  • RSAT-Clustering
  • RSAT-NLB
 

Windows PowerShell

PowerShell

 

Group Policy Management

GPMC

 

Quality Windows Audio Video Experience

Qwave

 

Remarks

ServerManagerCmd.exe does not support configuration or management of roles and features, after those are installed. Role and feature installations completed by using ServerManagerCmd.exe use default settings. To modify role or feature settings, to perform role administration tasks, or to view status or events for roles and features, you should use the Windows GUI–based Server Manager console. You might need to open other management snap-ins for your role that cannot be opened from within the Server Manager window.

noteNote
Although role and feature installations are secure by default, you should use the Server Manager console to modify any default settings to conform to security policies in your enterprise. ServerManagerCmd.exe cannot be used to install and to configure applications other than Windows Server 2008 roles, role services, or features. ServerManagerCmd.exe is not supported on computers running a Server Core installation option of Windows Server 2008. ServerManagerCmd.exe cannot be used for installation or removal of roles, role services, or features on remote computers.

Examples

The following are examples of how Server Manager commands are used.

Installing a role without an answer file

The following shows the ServerManagerCmd.exe syntax for installing Web Server (IIS) and all its role services. The administrator exports the results of the installation to an XML file called WebServer.xml. The administrator has also instructed Server Manager to restart the computer automatically when installation is complete, if required by the role.

ServerManagerCmd.exe -install Web-Server -allSubFeatures -resultPath C:\Admin\WebServer.xml -restart

Removing features by using an answer file and the ServerManagerCmd.exe command

An administrator is using the following command to repurpose several servers by removing a number of features. Commands for the features to be removed are provided in an answer file named RemoveAllTelnet.xml. The administrator has added the -whatIf option to the command to display the command operations specified in the Removalresults.xml answer file, and show if any software that is dependent on the items specified for removal in the answer file was also removed.

ServerManagerCmd.exe -inputPath C:\AdminFiles\RemoveAllTelnet.xml -resultPath C:\AdminFiles\removalresults.xml -whatIf

Additional references

Windows Script Center (http://go.microsoft.com/fwlink/?LinkID=63080)

Interpreting Output from Server Manager Commands

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft