Install/Remove Server 2008 Roles and Features from Command Line

 

ServerManagerCmd.exe command-line tool can be used to Install / Remove Server 2008 Roles and Features from command line. This command-line tool can be integrated into a script to manage roles and features. Below is the output you will from ServerManagerCmd.exe /?

 

Usage: ServerManagerCmd.exe
Installs and removes roles, role services and features. Also displays the list of all roles, role services, and features available, and shows which are installed on this computer. For additional information about the roles, roles services, and features that you can specify using this tool, refer to the Help for Server Manager.

 

Switch Parameters:

 

Examples:

    ServerManagerCmd.exe -query

    ServerManagerCmd.exe -install Web-Server -resultPath installResult.xml

    ServerManagerCmd.exe -inputPath install.xml -whatIf