How to stop/start IIS 7 application through command line?
36,735
Put this into a file with .bat
extension.
@echo off
appcmd start sites "site1"
appcmd stop sites "site2"
Update
Just ensure that appcmd
is available anywhere by adding %windir%\system32\inetsrv\
to the PATH
environment variable of your system. Alternatively, you can use the full path to appcmd.exe
in the batch file.
Author by
Eugene
Updated on July 10, 2022Comments
-
Eugene almost 2 years
I would like to create a batch file to start one IIS application, and stop another one.
How it can be done using command line?
How to combined it in batch file?