Use PowerShell to install IIS on Windows Server 2019

IIS is short for Internet Information Services and is a web server from Microsoft.

Search for PowerShell, right-click on “Windows PowerShell” and choose “Run as administrator

Run “Install-WindowsFeature -name Web-Server -IncludeManagementTools
The management tools have been included, this is optional and not needed if the web server is not to be managed on this server

To confirm the installation, open a browser and type in “localhost

IIS is also visible in Server Manager

To see which version of IIS is installed, run: “Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\ | Select-Object” in PowerShell

To stop the webserver, run “iisreset /stop
Replace “stop” with start or restart for the wanted action to be done

Learn more about IIS here and how to manage it through PowerShell