CMD & PowerShell

Enable Internet Information Services using Command Prompt (CMD)

Command to Enable IIS on Windows 11 & Windows Server

Enable IIS using CMD: It is a web server developed by Microsoft for hosting Websites, Applications, and Services on the Windows OS. IIS provides seamless integration with Windows Server and the broader Microsoft ecosystem. Its reliability and widespread support make it a trusted platform for enterprise environments, offering the stability and performance required for critical operations.

There are several ways available to enable this feature on Windows OS, you can either Enable Internet Information Services via Windows Features (GUI) on Windows 11 OS, or you can use the Command prompt to enable this feature in the CLI interface. With a little tweak in the command, we can enable IIS on Windows Servers using CLI. This article will provide detailed steps to enable Internet Information Services using Command Prompt. Let’s get started.

Internet Information Services (IIS) availability on different Windows Editions

This section provides information on the availability of this feature on different Windows Editions.

Windows EditionsAvailability
Windows ServersFully Available
Windows 11 HomeYes
Windows 11 ProfessionalYes
Windows 11 EducationYes
Windows 11 EnterpriseYes
Windows 11 Pro EducationYes
Windows 11 SENo
Windows 11 IoT EnterpriseYes

Easy way to Enable Internet Information Services using Command Prompt

  • Go to the Start menu and Search for Command Prompt. Run Command Prompt as Administrator.
Open Command Prompt as Administrator
Open Command Prompt as Administrator
  • User Account Control (UAC) will prompt for your permission to open CMD in Administrator mode. To confirm the action, click Yes.
  • On the Command Prompt, execute the following command. dism /online /enable-feature /featurename:IIS-WebServerRole /all /norestart
Command to Enable IIS using CMD
Command to Enable IIS using CMD
  • The above command will use DISM to Enable IIS using Command Prompt. Kindly be patient when the system enables this feature.
System Enables the required Feature
The system enables the required Feature
  • Once the process is complete, we will get the message, “The operation completed successfully“.
  • That is it. Internet Information Services is enabled via Command Prompt.
Operation completed successfully
The Operation was completed successfully

The same CMD command, dism /online /enable-feature /featurename:IIS-WebServerRole /all, can be used to install IIS on all modern Windows Server editions, including Windows Server 2012, 2016, 2019, and 2022, as it leverages the DISM tool, which is consistent across these versions.

Let’s decode the command:

Decoding IIS Enable Command
Decoding IIS Enable Command
  • dism: This stands for Deployment Imaging Service and Management Tool. It is a command-line tool used for managing Windows features, packages, and Windows image files (WIMs).
  • /online: This flag indicates that the operation is being performed on the currently running (online) Windows installation. It is used to modify the features of the live system.
  • /enable-feature: This flag tells DISM that you want to enable a specific feature in the operating system.
  • /featurename:IIS-WebServerRole: IIS-WebServerRole is the feature that installs the core IIS Web Server components. It includes necessary IIS functions like HTTP Server, configuration management, and core modules.
  • /all: This flag ensures that all required dependent features (Dependicies) for the IIS Web Server are also enabled.
  • /norestart: This flag prevents Windows from restarting automatically after enabling the feature. If you want the system to restart automatically once the feature is enabled, you can omit this flag.

Enable Internet Information Services using PowerShell

In this section, we will check out how to enable IIS using PowerShell. The following are the steps.

  • Open the Start menu using the shortcut Win Key + S, search for PowerShell, and run PowerShell as an Administrator.
Run PowerShell as Administrator
Run PowerShell as Administrator
  • Enter the following command in the PowerShell and click Enter. Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
PowerShell is installing IIS
PowerShell is installing IIS
  • Now, the PowerShell will install the Internet Information Services Feature and its related dependencies. Kindly be patient.
  • Once the process is completed, the system will prompt you whether you want to Restart or not. Enter Y for Restart and N for Restart later.
Choose whether you want to restart your system or not
Choose whether you want to restart your system or not
  • Upon entering your desired value, the system will conclude the process by displaying the summary. If the Restart needed column is True, then the system strongly suggests that it requires a restart so that the changes made will reflect.
Restart needed
Restart needed
  • That is it. IIS is now enabled on Windows 11 via PowerShell.

Video Walkthrough for Enabling IIS using CMD and PowerShell

Enable IIS using Command Prompt and Powershell [For Windows 11 & Windows Server Editions]

Take away

This approach of enabling IIS on Windows 11 and Windows Server Editions using Command Prompt, and PowerShell is beneficial for web developers for automation, remote management, and streamlined setups. If you have any queries, kindly let us know in the comment section. For more interesting articles, stay tuned to Winsides.com. Happy Coding! Peace out!

Why You Can Trust Winsides.com?

We combine expert insights with user-friendly guidance. We thoroughly research and test everything to give you reliable and simple to understand tech guides. Please take a look at our publishing process to understand why you can trust Winsides.

Vigneshwaran Vijayakumar

Hello, I'm Vigneshwaran, the founder, owner, and author of WinSides.Com. With nearly a decade of experience in blogging across various domains and specializing in Windows-related tutorials for over five years, I bring a wealth of knowledge and expertise to WinSides.Com

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close

Adblock Detected

Kindly disable the Adblocker