Install IIS on Windows Server 2016 and 2019 using PowerShell

When you are about to install IIS for Win Server 2006 or 2019 and encounter inexplicable errors, and try many methods, update Windows, and install .net35 but cannot install normally, you can try to use PowerShell.

1. Open PowerShell as administrator

        Use the command to view which IIS components are currently installed in your system get-windowsfeature web*

 2. Then use the command to start installing the basic IIS components

After installation, you can continue to use get-windowsfeature web* to see what is installed, if some components are not installed, then use the command to continue the installation separately

For example, I need to install [X] management tool Web-Mgmt-Tools separately

Then the command is install-windowsfeature web-mgmt-tools

and so on

Reference: “ How To Install IIS In Windows Server 2016  ”

Guess you like

Origin blog.csdn.net/danielcaisz/article/details/128192149