Hi there.
I have just typed another suggestion, close to the first.
You could schedule a task on the iisserver that runs iisreset.exe.
I have had problems by calling iisreset in a script, so I would recommend
to just call the iisreset.exe directly in the task.
You could call the task "Iisreset" :-)
Then afterwards, you download psexec.exe from
www.sysinternals.com,
put it in the system32 folder on the machine or server you want to
use for initiating the iisreset on your webserver.
You then call this in a script:
start psexec \\ddkcx01 schtasks /run /TN "Iisreset"
and the local scheduled task is being run.
The good thing about this solution is, that you should not worry much about
your rights to do stuff through the network.
You initiate a local job, that is run with an account belonging to the machines "administrators" account,
and you have all the necessary rights.
If you ever is starting the job, and it won't stop or has some problems,
you can stop the job by creating a script with:
start psexec \\ddkcx01 schtasks /end /TN "Iisreset"
But that should not be necessary under normal circumstances.
Main Topics
Browse All Topics





by: knightEknightPosted on 2009-04-03 at 16:50:54ID: 24065265
First, create a scheduled task on the server that runs your batch file. Disable the task so that it doesn't run automatically.
Then you can manually run the task from your remote host by doing this:
schtasks.exe /run /s yourServerName /tn nameOfTheTask