Esporta (0) Stampa
Espandi tutto
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
Espandi Riduci a icona

Servermanagercmd

Aggiornamento: agosto 2009

Si applica a: Windows Server 2008, Windows Server 2008 R2

Installs and removes ruoli, ruoli server e funzionalità. Also displays the list of all ruoli, ruoli server e funzionalità available, and shows which are installed on this computer. For additional information about the ruoli, ruoli server e funzionalità 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 ruoli, ruoli server e funzionalità 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 ruoli, ruoli server e funzionalità 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 ruolo, servizio ruolo o funzionalità specified by Id. The identifiers are case-insensitive. Multiple ruoli, ruoli server e funzionalità 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 ruolo, servizio ruolo o funzionalità named in the Id value.

    noteNota
    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 Gestione server 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 Gestione server 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.

    noteNota
    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 ruolo, servizio ruolo o funzionalità specified by Id. The identifiers are case-insensitive. Multiple ruoli, ruoli server e funzionalità 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.

    noteNota
    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 Gestione server 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 Gestione server on computers that are running Windows Server® 2008 R2, you use the Windows PowerShell cmdlets that are available for Gestione server. 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.

ImportantImportante
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 ruoli, ruoli server e funzionalità available, and which ruoli, ruoli server e funzionalità are installed on the computer.

servermanagercmd -query

The following example shows how to use servermanagercmd to install the Web Server (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 ruoli, ruoli server e funzionalità 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 ruolo, servizio ruolo o funzionalità 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 Gestione server.

  • Command-Line Syntax Key

Il documento è risultato utile?
(1500 caratteri rimanenti)
Grazie per i commenti inviati.

Aggiunte alla community

AGGIUNGI
Mostra:
© 2014 Microsoft