If you think GUI is not your cup of tea then use Windows Terminal (Powershell) command to install and enable Internet Information Services (IIS) on Windows 11.
Using IIS, information such as files or documents can be made available on the network. Supported communication protocols are HTTP, HTTPS, FTP, SMTP, POP3 or WebDAV, and other protocols. The web server is able to run ASP.NET applications. It competes with the Apache web server and represents an alternative to so-called LAMP-based (Linux, Apache, MySQL, PHP) systems.
This article will explain the command to install IIS using PowerShell on Windows 11.
Powershell Command to enable Internet Information Services on Windows 11
1. Open Windows Terminal (Powershell)
On your Windows 11 operating system, right-click on the Start button and select the “Windows Terminal (Admin)” option.
2. Command to install IIS on Windows 11
Next, run just the given command syntax to enable whatever service you want, and the same can be used for IIS and its components as well.
Enable-WindowsOptionalFeature -Online -FeatureName <service-name>
Let’s say we want to use the above syntax to enable- IIS, common features, Management console, and more… The command will be:
______________________________________________________
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing
_______________________________________________________
Once it has been enabled, Press Y to restart your system.
3. Run IIS Server Manager
To access IIS Manager, go to the Search icon, click it, and type IIS. Once the option “Internet Information Services” appears, click to run the same.
4. Command to restart or get the status of the webserver
Well, of course, we can restart the Web server directly from the IIS manager GUI interface, just for knowledge, this can be done using the CLI.
For the status of the running webserver
Get-Service W3SVC
To start IIS:
iisreset
5. Disable Internet Information Services
As we have used the command to enable the Web services, we can use the same to disable the IIS server. Here is that, simply run the given command in your Windows Terminal (Powershell) to uninstall Microsoft web server- IIS.
Disable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer
Other Articles:
- Steps to install IIS on Windows 11 using GUI
- How to create a web server on Google chrome
- How to download & use the Caddy webserver
Related Posts
How to use the XLOOKUP function in Microsoft Excel with Example
Check the RAM type on Windows 11 or 10. See what DDR RAM you have on your PC in different ways
How to Check Firmware in CMD on Windows 11 or 10
How to Change WIFI or Ethernet MAC address on Windows 11 or 10?
How to Install 7-Zip on Windows 11 or 10 with Single Command
Install Google Earth on Windows 11 or 10 Using a Single Command