Hello,
Normally we are installing IIS from the Server Manager. Most of the people have not idea how to install IIS from command prompt. Please check this out, after that you will be able to installed IIS from command prompt!
Open a Command Prompt, and type the following command in one line. You can copy the command and paste it in the Command Prompt window.
======================>>>
Servermanagercmd.exe -i Web-Server Web-WebServer Web-Common-Http Web-Static-Content Web-Default-Doc Web-Dir-Browsing Web-Http-Errors Web-App-Dev Web-Asp-Net Web-Net-Ext Web-ISAPI-Ext Web-ISAPI-Filter Web-Health Web-Http-Logging Web-Request-Monitor Web-Security Web-Filtering Web-Performance Web-Stat-Compression Web-Mgmt-Tools Web-Mgmt-Console Web-Mgmt-Console Web-Metabase Web-WMI Web-Lgcy-Scripting Web-Lgcy-Mgmt-Console RSAT-Web-Server
======================>>>
Now, you have successfully installed IIS in your server.
Thank you!