To install certain feature or roles use the following command:
ServerManagerCmd -i %ServerRole%
ServerManagerCmd -i web-server
To remove features you can use the same commands, but instead of specifying the Install switch "-i", you need to specify the remove switch "-r".
By adding the -restart switch you are telling Windows that if a reboot is required, the system may issue a restart when execution has finished.
Using powershell is fairly the same procedure. You can swith to powershell by issueing the "powershell" command in the Dos box.
Add-WindowsFeature Web-Server, Application-Server
Notice the sepperator.
Remove-WindowsFeature Web-Server, Application-Server
You see, adding and removing Windows feature is a simple and quicker procedure as installing them trough the GUI.