Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Web Servers»IIS»How to Start and Stop All Sites in IIS

    How to Start and Stop All Sites in IIS

    By RahulMarch 6, 20201 Min ReadUpdated:March 22, 2020

    Internet Information Service (IIS) is the popular web server developed by Microsoft Corporation. It runs on Windows servers and serve websites to users. The PowerShell is the configuration and management application for the Microsoft systems. In this tutorial you will learn how to enable (start) or disable (stop) all sites in single command with PowerShell.

    Advertisement

    Useful links:

    • How to create website in IIS using command line
    • How To Redirect HTTP to HTTPS in IIS

    Launch PowerShell

    Type PowerShell in application search option. Then right click on PowerShell application and select “Run as administrator”. This will provide you administrative privileges to perform actions.

    Launch powershell as administrator

    Start or Stop All Sites in IIS

    The WebAdministration module provides the methods to manage IIS on windows system. So first, import WebAdministration module on Powershell, then run the following commands to start or stop all IIS sites.

    Stop all sites

    Import-Module WebAdministration
    Get-ChildItem -Path IIS:\Sites | foreach { Stop-WebSite $_.Name; }
    

    Start all sites

    Import-Module WebAdministration
    Get-ChildItem -Path IIS:\Sites | foreach { Start-WebSite $_.Name; }
    

    iis PowerShell Sites Start Stop
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Install PowerShell on Fedora

    How to Install PowerShell on Fedora

    Check Windows Uptime

    How to Check Computer Uptime in Windows

    Which Process is listening on a Port in Windows

    Which Process is Listening on a Port in Windows

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.