轉自:http://blog.sina.com.cn/s/blog_537de4b5010128al.html Windows2008 安裝組件服務等內容比原來複雜的多,用滑鼠點來點去,既繁瑣也緩慢,所幸微軟提供了命令行工具ServerManagerCmd.exe 用法: ServerManager ...
轉自:http://blog.sina.com.cn/s/blog_537de4b5010128al.html
Windows2008 安裝組件服務等內容比原來複雜的多,用滑鼠點來點去,既繁瑣也緩慢,所幸微軟提供了命令行工具ServerManagerCmd.exe
用法:
ServerManagerCmd.exe
安裝和刪除角色、角色服務和功能。也顯示所有可用的
角色、角色服務和功能列表,並顯示在此電腦上安裝了
其中哪些內容。有關可以使用此工具指定的角色、
角色服務和功能的詳細信息,請參閱伺服器管理器的“幫助”。
-query [<query.xml>] [-logPath <log.txt>]
-install <名稱>
[-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]
[-allSubFeatures]
-remove <名稱>
[-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]
-inputPath <answer.xml>
[-resultPath <result.xml> [-restart] | -whatIf] [-logPath <log.txt>]
-help | -?
-version
開關參數:
-query [<query.xml>]
顯示所有可用的角色、角色服務和功能列表,
並顯示在此電腦上安裝了其中哪些內容。(縮寫: -q)
如果已指定 <query.xml>,則還會將該信息保存
到 query.xml 文件,其中還包含其他信息。
-inputPath <answer.xml>
安裝或刪除在 XML 應答文件中指定的
角色、角色服務和功能,該文件的路徑和名稱由
<answer.xml> 表示。(縮寫: -ip)
-install <名稱>
在由 <name> 參數指定的電腦上安裝
角色、角色服務或功能。必須用空格隔開
多個角色、角色服務或功能。(縮寫: -i)
-allSubFeatures
與 -install 參數一起使用,安裝
所有下級角色服務和功能以及使用 -install 參數
命名的角色、角色服務或功能。(縮寫: -a)
-remove <名稱>
從由 <name> 參數指定的電腦上刪除
角色、角色服務或功能。必須用空格隔開
多個角色、角色服務或功能。(縮寫: -r)
-resultPath <result.xml>
以 XML 格式將 ServerManagerCmd.exe 操作的結果保存
到 <result.xml> 文件。(縮寫: -rp)
-restart
如果完成該操作時需要重新啟動,則會自動
重新啟動電腦。
-whatIf
顯示要在 answer.xml 文件中指定的當前
電腦上執行的操作。(縮寫: -w)
-logPath <log.txt>
為日誌文件指定非預設位置。(縮寫: -l)
-help
顯示幫助信息。(縮寫: -?)
-version
顯示正在運行的伺服器管理器命令的版本、
Microsoft 商標信息和操作系統。
(縮寫: -v)
示例:
ServerManagerCmd.exe -query
ServerManagerCmd.exe -install Web-Server -resultPath installResult.xml
ServerManagerCmd.exe -inputPath install.xml -whatIf
下麵是
Role/Service or Main Feature | R/S/F Name | Installatiom command |
DHCP Server | DHCP Server | DHCP |
Print Services | Print Server | Print-Services |
Internet Printing | Print-Internet | |
LPD Service | Print-LPD-Service | |
Terminal Services | Terminal Services | Terminal-Services |
Terminal Server | TS-Terminal-Server | |
TS Licensing | TS-Licensing | |
TS Gateway | TS-Gateway | |
TS Web Access | TS-Web-Access | |
TS Session Broker | TS-Session-Broker | |
Active Directory Domain Services | AD | N/A |
Active Directory Domain Controller | ADDS-Domain-Controller | |
Identity Management for UNIX | ADDS-Identity-Management | |
Server for Network Information Service | ADDS-NIS | |
Password Synchronization | ADDS-Password-Sync | |
DNS Server | DNS | |
File Services | File Services | N/A |
Distributed File System (DFS) | FS-DFS | |
DFS Namespace | FS-DFS-Namespace | |
DFS Replication | FS-DFS-Replication | |
File Server Resource Manager | FS-Resource-Manager | |
Services for Network File System | FS-NFS-Services | |
Windows Search Service | FS-Search-Service | |
Windows Server 2003 File Services | FS-Win2003-Services | |
File Replication Service | FS-Replication | |
Indexing Service | FS-Indexing-Service | |
Web Server | Web Server (IIS) | Web-Server |
Internet Information Services | Web-WebServer | |
Common HTTP Features | Web-Common-Http | |
Static Content | Web-Static-Content | |
Default Document | Web-Default-Doc | |
Directory Browsing | Web-Dir-Browsing | |
HTTP Errors | Web-Http-Errors | |
HTTP Redirection | Web-Http-Redirect | |
Application Development | Web-App-Development | |
ASP.NET | Web-Asp-Net | |
.NET Extensibility | Web-Net-Ext | |
ASP | Web-ASP | |
CGI | Web-CGI | |
ISAPI Extensions | Web-ISAPI-Ext | |
ISAPI Filters | Web-ISAPI-Filter | |
Server Side Includes | Web-Includes | |
Health and Diagnostics | Web-Health | |
HTTP Logging | Web-Http-Logging | |
Logging Tools | Web-Log-Libraries | |
Request Monitor | Web-Request-Monitor | |
Tracing | Web-Http-Tracing | |
Custom Logging | Web-Custom-Logging | |
ODBC Logging | Web-ODBC-Logging | |
Security | Web-Security | |
Basic Authentication | Web-Basic-Auth | |
Windows Authentication | Web-Windows-Auth | |
Digest Authentication | Web-Digest-Auth | |
Client Certificate Mapping Authentication | Web-Client-Auth | |
IIS Client Certificate Mapping Authentication | Web-Cert-Auth | |
URL Authorization | Web-Url-Auth | |
Request Filtering | Web-Filtering | |
IP and Domain Restrictions | Web-IP-Security | |
Performance | Web-Performance | |
Static Content Compression | Web-Stat-Compression | |
Dynamic Content Compression | Web-Dyn-Compression | |
Management Tools | Web-Mgmt-Tools | |
IIS Management Console | Web-Mgmt-Console | |
IIS Management Scripts and Tools | Web-Scripting-Tools | |
Management Service | Web-Mgmt-Service | |
IIS 6 Management Compatibility | Web-Mgmt-Compat | |
IIS 6 Metabase Compatibility | Web-Metabase | |
IIS 6 WMI Compatibility | Web-WMI | |
IIS 6 Scripting Tools | Web-Lgcy-Scripting | |
IIS 6 Management Console | Web-Lgcy-Mgmt-Console | |
FTP Publishing Service | Web-Ftp-Publishing | |
FTP Server | Web-Ftp-Server | |
FTP Management Console | Web-Ftp-Mgmt-Console | |
Active Directory Federation Services | ADFS | None |
Federation Service | ADFS-Federation | |
Federation Service Proxy | ADFS-Proxy | |
Web Agents | ADFS-Web-Agents | |
Claims-aware Agent | ADFS-Claims | |
Windows Token-based Agent | ADFS-Windows-Token | |
Active Directory Lightweight Directory Services | Formerly ADAM | ADLDS |
Application Server | Application Server | Application-Server |
Application Server Core | AS-AppServer-Core | |
Web Server Support | AS-Web-Support | |
COM+ Network Access | AS-Ent-Services | |
TCP Port Sharing | AS-TCP-Port-Sharing | |
Windows Process Activation Service Support | AS-WAS-Support | |
HTTP Activation | AS-HTTP-Activation | |
Message Queuing Activation | AS-MSMQ-Activation | |
TCP Activation | AS-TCP-Activation | |
Named Pipes Activation | AS-Named-Pipes | |
Distributed Transaction Support | AS-Dist-Transaction | |
Incoming Remote Transactions | AS-Incoming-Trans | |
Outgoing Remote Transactions | AS-Outgoing-Trans | |
WS-Atomic Transaction Support | AS-WS-Atomic | |
Active Directory Certificate Services | Active Directory Certificate Services | N/A |
Certification Authority | ADCS-Cert-Authority or AD-Certificate | |
Online Certificate Status Protocol | ADCS-Online-Cert | |
Fax Server | Fax Server | Fax |
Network Policy and Access Services | Network Policy and Access Services | NPAS |
Network Policy Server | NPAS-Policy-Server | |
NPAS Routing and Remote Access Services | NPAS-RRAS-Services | |
Remote Access Service | NPAS-RRAS | |
Routing | NPAS-Routing | |
Health Registration Authority | NPAS-Health | |
Windows Deployment Services | Windows Deployment Services | WDS |
Hyper-V | Hyper-V | Hyper-V |
Failover Clustering | Failover Clustering | Failover-Clustering |
Network Load Balancing | Network Load Balancing | NLB |
Desktop Experience | Desktop Experience | Desktop-Experience |
.NET Framework 3.0 Features | .NET Framework 3.0 Features | NET-Framework |
.NET Framework 3.0 | .NET Framework 3.0 | NET-Framework-Core |
XPS Viewer | XPS Viewer | NET-XPS-Viewer |
Windows Communication Foundation Activation Components | Windows Communication Foundation Activation Components | NET-Win-CFAC |
HTTP Activation | HTTP Activation | NET-HTTP-Activation |
Non-HTTP Activation | Non-HTTP Activation | NET-Non-HTTP-Activ |
Windows System Resource Manager | Windows System Resource Manager | WSRM |
Wireless Networking | Wireless Networking | Wireless-Networking |
Windows Server Backup | Windows Server Backup | Backup |
WINS Server | WINS Server | WINS-Server |
Remote Assistance | Remote Assistance | Remote-Assistance |
Simple TCP/IP Services | Simple TCP/IP Services | Simple-TCPIP |
Telnet Client | Telnet Client | Telnet-Client |
Telnet Server | Telnet Server | Telnet-Server |
Subsystem for UNIX-based Applications | Subsystem for UNIX-based Applications | Subsystem-UNIX-Apps |
RPC over HTTP Proxy | RPC over HTTP Proxy | RPC-over-HTTP-Proxy |
SMTP Server | SMTP Server | SMTP-Server |
LPR Port Monitor | LPR Port Monitor | LPR-Port-Monitor |
Storage Manager for SANs | Storage Manager for SANs | Storage-Mgr-SANS |
BITS Server Extensions | BITS Server Extensions | BITS |
Message Queuing | Message Queuing | MSMQ |
Message Queuing Services | MSMQ-Services | |
Message Queuing Server | MSMQ-Server | |
Directory Service Integration | MSMQ-Directory | |
Message Queuing Triggers | MSMQ-Triggers | |
HTTP Support | MSMQ-HTTP-Support | |
Multicasting Support | MSMQ-Multicasting | |
Routing Service | MSMQ-Routing | |
Windows 2000 Client Support | MSMQ-Win2000 | |
Messaging Queue DCOM Proxy | MSMQ-DCOM | |
Windows Process Activation Service | Windows Process Activation Service | WAS |
Process Model | WAS-Process-Model | |
.NET Environment | WAS-NET-Environment | |
Configuration APIs | WAS-Config-APIs | |
Windows Internal Database | Windows Internal Database | Windows-Internal-DB |
BitLocker Drive Encryption | BitLocker Drive Encryption | BitLocker |
Multipath I/O | Multipath I/O | Multipath-IO |
Internet Storage Naming Server | Internet Storage Naming Server | ISNS |
Removable Storage Manager | Removable Storage Manager | Removable-Storage |
TFTP Client | TFTP Client | TFTP-Client |
SNMP Services | SNMP Services | SNMP-Services |
SNMP Service | SNMP-Service | |
SNMP WMI Provider | SNMP-WMI-Provider | |
Services for Network File System | Services for Network File System | NFS-Services |
Internet Printing Client | Internet Printing Client | Internet-Print-Client |
Peer Name Resolution Protocol | Peer Name Resolution Protocol | PNRP |
Connection Manager Administration Kit | Connection Manager Administration Kit | CMAK |
Remote Server Administration Tools | Remote Server Administration Tools | RSAT |
Role administration tools | RSAT-Role-Tools | |
Active Directory Certificate Services Tools | RSAT-ADCS | |
Active Directory Domain Services Tools | RSAT-ADDS | |
Active Directory Domain Controller Tools | RSAT-ADDC | |
Server for NIS Tools | RSAT-SNIS | |
Active Directory Lightweight Directory Services Tools | RSAT-ADLDS | |
Active Directory Rights Management Services (AD RMS) Tools | RSAT-RMS | |
DHCP Server Tools | RSAT-DHCP | |
DNS Server Tools | RSAT-DNS | |
Fax Server Tools | RSAT-Fax | |
DFS Management Console Tools | RSAT-DFS-Mgnt-Con | |
File Server Resource Manager Management Console Tools | RSAT-FSRM-Mgnt | |
Hyper-V Tools | RSAT-Hyper-V | |
Services for Network File System Tools | RSAT-NFS-Admin | |
File Services Tools | RSAT-File-Services | |
Network Policy and Access Services Tools | RSAT-NPAS | |
Health Registration Authority Tools | RSAT-HRA | |
Network Policy Server Tools | RSAT-NPS | |
Print Services Tools | RSAT-Print-Services | |
Web Server (IIS) Tools | RSAT-Web-Server | |
Terminal Services Tools | RSAT-TS | |
TS RemoteApp Tools | RSAT-TS-RemoteApp | |
TS Gateway Tools | RSAT-TS-Gateway | |
TS Licensing Tools | RSAT-TS-Licensing | |
UDDI Services Tools | RSAT-UDDI | |
Feature administration tools | RSAT-Feature-Tools | |
BitLocker Drive Encryption Tools | RSAT-BitLocker | |
BITS Server Extensions Tools | RSAT-BITS-Server | |
Failover Clustering Tools | RSAT-Clustering | |
Network Load Balancing Tools | RSAT-NLB | |
SMTP Server Tools | RSAT-SMTP | |
Windows Deployment Services Tools | RSAT-WDS | |
WINS Server Tools | RSAT-WINS | |
Hyper-V Tools | RSAT-Hyper-V | |
Windows PowerShell | Windows PowerShell | PowerShell |
Group Policy Management | Group Policy Management | GPMC |
Quality Windows Audio Video Experience | Quality Windows Audio Video Experience |