How to stop/start IIS 7 application through command line?

http://www.windowsnetworking.com/articles_tutorials/Configuring-IIS-7-command-line-Appcmdexe-Part1.html

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)