I've made a bat for restarting IIS and scheduled it to run every 2 hours, (cuz i have to find a solution for an exchange prob, and i use this workaround as temporary solution for the problem)
iisreset.bat
CODE
start iisreset
when the schedule starts it popup a LOT of Cmd windows (20-30 Windows) with the path of the script.
Does anyone have any hint?
BTW
Meery Xmas to all
FuricTrax
Dec 24 2004, 11:13
These other bat files might be for all the other services that depend on iis?
I have some experience with Exchange. What is the actual problem that you need to keep restarting iis to fix
the problem is related to the delivering of e-mail in the Lan, restarting IIS (for Smtp) it will deliver the mail succesfully, until i get to fix this problem(it seems that is related with the AV,,,Trend) i have to restart iis .
The problem now is with the number of cmd windows that pops out when the bat is exeute.
Aaron P
Dec 24 2004, 13:04
Is there a space in the path to the script? Try a path without spaces.
primortal
Dec 24 2004, 16:28
if you are running iis 5 take a look at this
http://www.microsoft.com/downloads/details...&DisplayLang=enfor iis 6 try this vb code (just save it as iisrestart.vbs). change '2142295254' to your server name
CODE
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")
Set colItems = objWMIService.ExecQuery _
("Select * From IIsWebServer Where Name = " & _
"'W3SVC/2142295254'")
For Each objItem in colItems
objItem.Start
Next
BudMan
Dec 24 2004, 18:30
if its the smtp portion that is causing you issues, why not just stop and start the smtp service? Why do you need to reset all of IIS?
net stop servicename
net start servicename
or you could use
sc stop servicename
sc start servicename
Or if your really having issues and the service is hanging, why not just set the service to restart on failure - and then kill it every 2 hours?
nice ideas....when i return from holidays i will try it.
@primortal......What that vbs will do???
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.