How to start stop Website IIS Command Way

Open Command Prompt

Set the path of appcmd to path

SET PATH=%PATH%;%systemroot%\system32\inetsrv\

List Sites:
appcmd list site

To Restart:
appcmd start site /site.name:{sitename}
or
appcmd stop site /site.name:{sitename}

Through Power Shell

PS C:\Users\Administrator> Import-Module WebAdministration
PS C:\Users\Administrator> Stop-WebSite example.com
PS C:\Users\Administrator> Start-WebSite example.com

Hope this helps. See you in our next post. Till then Code with Confidence

you're currently offline