I would like to write a script to start IIS server automatically if it is stopped.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the IIS Admin Scripts to query the server, and then start it if you need.
The script is located in
%systemroot%\system32.To query you server, just run
IIsWeb.vbs /query w3svc/1from a command line.If it’s not running, then you can run
IIsWeb.vbs /start w3svc/1to start it.Here is an article with more information on these scripts.