|
Question : Script to stop and restart a service on Windows Server
|
|
Hi,
Could you help me with writing a batch file to start and stop a service on a Windows Exchange server. It should be a little more sophisticated than:
net start "Microsoft Exchange Information Store" net stop "Microsoft Exchange Information Store"
the function of the batch file should is to stop and restart the Store service after office hours to temporarily troubleshoot a problem associated with rising handle count by the Store.exe process.
The file should check to see if the service is already running and echo output to the screen.
Please also explain how to set up this batch file to run at scheduled times....
thx
|
Answer : Script to stop and restart a service on Windows Server
|
|
If there are spaces you need to enclose with quotes, for example: sc stop "Apple Mobile Device"
|
|
|