I used to start and stop the IIS service when necessary by going through Start | Control Panel | Administrative Tools | Services, selecting the IIS Admin service, and clicking the "start", "stop", or "restart" button on the toolbar as necessary. Eventually I decided that going through this multi-step procedure every time was too slow, and went looking for some ways to accomplish the same tasks from the command line. The shortcuts below work with IIS 5, and I believe they also work with IIS 6.
iisreset
This resets the IIS Admin service, including the World Wide Web Publishing service.
iisreset /timeout:0
This resets the IIS Admin service faster. According to the help information (iisreset /?), iisreset normally might wait up to 20 seconds to wait for a successful stop of internet services before the restart is performed. The timeout:0 parameter causes the reset to be performed immediately.
net stop iisadmin /y
This stops the IIS Admin service and dependent services (including the WWW service) without restarting them. The /y parameter skips the confirmation prompt that would otherwise be displayed.
net start w3svc
This starts the WWW and IIS Admin services after they were previously stopped.
You haven't updated this in a while. How are we supposed to get our techonology fix?!
ReplyDelete