How to Enable IIS Web Server on Windows 11 Using Command Line

This tutorial is about how to enable IIS web server on Windows 11 using command line. We will do our best for you to understand this guide. I hope you will like this blog How to Enable IIS Web Server on Windows 11 Using Command Line. If your answer is yes, please share after reading this.

Check how to enable IIS web server on Windows 11 using command line

According to Microsoft Docs, the Web Server (IIS) role in Windows Server 2019 provides a secure, easy-to-manage, modular, and extensible platform for reliably hosting websites, services, and applications. Microsoft’s new version of Windows Server 2019 comes with IIS version 10, and this guide shows how to install it and how to approach various activities such as creating websites, virtual directories, etc. We will start by installing IIS.

Install IIS Using Windows Commands

  • Type cmd in the search bar and the first result should be Command Prompt. Click Run as administrator.
  • Type the command DISM /online /enable-feature /featureName:IIS-DefaultDocument /All and press Enter.
  • You will see a progress bar appear. Once it reaches 100.0% and the message “Operation completed successfully” appears. you can close the command prompt. IIS is installed.
  • Make sure you can open the IIS manager and the installation worked by following steps 4-7 in Install IIS Using the GUI.

Install IIS with PowerShell

  • Type powershell in the search bar and one of the results should be PowerShell ISE. Click Run as administrator.
  • Enter the Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -NoRestart cmdlet and run it. You will see a progress bar start. When done, verify that IIS is installed and running.
  • This step is optional, but you can save it as a PowerShell script and then run it at any time. Work with the script and add different parameters. Eventually, you’ll have an IIS installer script that sets things up exactly the way you want, every time, with a single click.

Final Words: How to Enable IIS Web Server on Windows 11 Using Command Line

Hope you understand this article How to Enable IIS Web Server on Windows 11 Using Command Line, if your answer is no, you can ask anything via the contact forum section linked to this article. And if your answer is yes, share this article with your family and friends.