(0) exportieren Drucken
Alle erweitern
Arp
At
Cd
Cls
Cmd
Del
Dir
Fc
For
Ftp
If
Ldp
Lpq
Lpr
Md
Mmc
Msg
Nlb
Rcp
Rd
Reg
Rem
Ren
Rsh
Rsm
Rss
Sc
Set
Sfc
Ver
Vol
Erweitern Minimieren

Servermanagercmd

Letzte Aktualisierung: August 2009

Betrifft: Windows Server 2008, Windows Server 2008 R2

Installs and removes Rollen, Rollendienste und Features. Also displays the list of all Rollen, Rollendienste und Features available, and shows which are installed on this computer. For additional information about the Rollen, Rollendienste und Features that you can specify by using this tool, see the Server Manager Help. (http://go.microsoft.com/fwlink/?LinkID=137387).

For examples of how to use this command, see Examples.

Syntax

servermanagercmd -query [[[<Drive>:]<Path>]<query.xml>] [-logPath   [[<Drive>:]<Path>]<log.txt>]
servermanagercmd -inputpath  [[<Drive>:]<Path>]<answer.xml> [-resultPath <result.xml> [-restart] | -whatIf] [-logPath [[<Drive>:]<Path>]<log.txt>]
servermanagercmd -install <Id> [-allSubFeatures] [-resultPath   [[<Drive>:]<Path>]<result.xml> [-restart] | -whatIf] [-logPath   [[<Drive>:]<Path>]<log.txt>]
servermanagercmd -remove <Id> [-resultPath    <result.xml> [-restart] | -whatIf] [-logPath  [[<Drive>:]<Path>]<log.txt>]
servermanagercmd [-help | -?]
servermanagercmd -version

Parameters

 

Parameter Description

-query [[[<Drive>:]<Path>]<query.xml>]

Displays a list of all Rollen, Rollendienste und Features installed and available for installation on the server. You can also use the short form of this parameter, -q. If you want the query results saved to an XML file, specify an XML file to replace query.xml.

-inputPath <[[<Drive>:]<Path>]answer.xml>

Installs or removes the Rollen, Rollendienste und Features specified in an XML answer file represented by answer.xml. You can also use the short form of this parameter, -p.

-install <Id>

Installs the Rolle, Rollendienst oder Feature specified by Id. The identifiers are case-insensitive. Multiple Rollen, Rollendienste und Features must be separated by spaces. The following optional parameters are used with the -install parameter.

  • -setting <SettingName>=<SettingValue>   Specifies required settings for the installation.

  • -allSubFeatures   Specifies the installation of all subordinate services and features along with the parent Rolle, Rollendienst oder Feature named in the Id value.

    noteHinweis
    Some role containers do not have a command line identifier to allow 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.

    noteHinweis
    You cannot run servermanagercmd with both the -resultPath parameter and the -whatIf parameter specified.

  • -restart   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 parameter. You can also use the short form of the -whatIf parameter, -w. You cannot run servermanagercmd with both the -resultPath parameter and the -whatIf parameter specified.

  • -logPath <[[<Drive>:]<Path>]log.txt>   Specifies a name and location for the log file, other than the default, %windir%\temp\servermanager.log.

-remove <Id>

Removes the Rolle, Rollendienst oder Feature specified by Id. The identifiers are case-insensitive. Multiple Rollen, Rollendienste und Features must be separated by spaces. The following optional parameters are used with the -remove parameter.

  • -resultPath <[[<Drive>:]<Path>]result.xml>   Saves removal results to an XML file represented by result.xml. You can also use the short form of this parameter, -r.

    noteHinweis
    You cannot run servermanagercmd with both the -resultPath parameter and the -whatIf parameter specified.

  • -restart   Restarts the computer automatically when removal is complete (if restarting is required by remaining roles or features).

  • -whatIf   Displays any operations specified for the -remove parameter. You can also use the short form of the -whatIf parameter, -w. You cannot run servermanagercmd with both the -resultPath parameter and the -whatIf parameter specified.

  • -logPath <[[<Drive>:]<Path>]log.txt>   Specifies a name and location for the log file, other than the default, %windir%\temp\servermanager.log.

-help

Displays Help in the Command Prompt window. You can also use the short form, -?.

-version

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

Remarks

Servermanagercmd is deprecated, and is not guaranteed to be supported in future releases of Windows. We recommend that if you are running Server-Manager on computers that are running Windows Server® 2008 R2, you use the Windows PowerShell cmdlets that are available for Server-Manager. For more information, see Server Manager cmdlets.

Servermanagercmd can be run from any directory on the server's local drives. You must be a member of the Administrators group on the server on which you want to install or remove software.

ImportantWichtig
Because of security restrictions imposed by User Account Control in Windows Server 2008 R2, you must run Servermanagercmd in a Command Prompt window opened with elevated permissions. To do this, right-click the Command Prompt executable, or the Command Prompt object on the Start menu, and then click Run as administrator.

Examples

The following example shows how to use servermanagercmd to display a list of all Rollen, Rollendienste und Features available, and which Rollen, Rollendienste und Features are installed on the computer.

servermanagercmd -query

The following example shows how to use servermanagercmd to install the Webserver (IIS) role, and save the installation results to an XML file represented by installResult.xml.

servermanagercmd -install Web-Server -resultPath installResult.xml

The following example shows how to use the –whatIf parameter with servermanagercmd to display detailed information about the Rollen, Rollendienste und Features that would be installed or removed, based upon instructions that are specified in an XML answer file represented by install.xml.

servermanagercmd -inputPath install.xml -whatIf

Additional references

  • For a complete list of the Rolle, Rollendienst oder Feature identifiers you can specify for the Id parameter, or more information about using an XML answer file with Servermanagercmd, see the Server Manager Help. (http://go.microsoft.com/fwlink/?LinkID=137387).

  • See Server Manager cmdlets for a listing of Windows PowerShell cmdlets that are available for Server-Manager.

  • Command-Line Syntax Key

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft