Use PowerShell to install IIS on Windows Server 2019
- solbergtonje
- 16 nov. 2024
- 1 min läsning
Uppdaterat: 25 dec. 2024
IIS is short for Internet Information Services, it is created by Microsoft and contain functions for web servers.

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
SOURCES
PowerShell Cmdlets: https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/iisadministration-powershell-cmdlets





