2007/03/13

Windows 2000/IIS 5.0에 기본으로 들어있는 IISReset.exe 유틸리티로 IIS 서비스를 멈추거나 다시 시작할 수 있으며, 필요하면 서버 컴퓨터를 재부팅할 수 있습니다. 로컬호스트 뿐만 아니라 컴퓨터 이름(NetBIOS Name)이나 IP address로 원격 연결하여 IIS를 리셋트시킬 수 있습니다.


IISReset 유틸리티는 net start/stop 명령과 비슷하지만, IIS 프로세스를 좀더 다양한 옵션으로 리셋트할 수 있는 것이 다릅니다. 물론 W3SVC, SMTPSVC, MSFTPSVC, IISAdmin 등 인터넷 서비스를 한꺼번에 다룰 수 있습니다. ( 참고 )



IISRESET.EXE (c) Microsoft Corp. 1998-1999

사용법:


iisreset [컴퓨터 이름]

/RESTART 모든 인터넷 서비스를 중지한 다음 다시 시작합니다.


/START 모든 인터넷 서비스를 시작합니다.


/STOP 인터넷 서비스를 중지합니다.


/REBOOT 컴퓨터를 다시 부팅합니다.


/REBOOTONERROR 인터넷 서비스를 시작할 때, 중지할 때 또는 다시 시작할 때,

오류가 생기면 컴퓨터를 다시 부팅합니다.


/NOFORCE 인터넷 서비스를 성공적으로 중지하지 못하는 경우,
인터넷 서비스를 강제로 종료하지 않습니다.


/TIMEOUT:val 인터넷 서비스를 성공적으로 중지하기 위해 필요한
대기 시간 제한 값(초)을 지정합니다. 이 시간 제한이
만료되면, /REBOOTONERROR 매개 변수가 지정된 경우에는
컴퓨터를 다시 부팅할 수 있습니다.
기본값은 다시 시작하는데 20초, 중지하는데 60초,
다시 부팅하는데 0초입니다.


/STATUS 모든 인터넷 서비스의 상태를 표시합니다.


/ENABLE 로컬 시스템에서 인터넷 서비스를 다시 시작할 수 있습니다.


/DISABLE 로컬 시스템에서 인터넷 서비스를 다시 시작할 수 없습니다.



Examples:

The following command will attempt to restart all running Web services and reboot the computer if the command is not successful for any reason:

IISRESET /RESTART /REBOOTONERROR
This following will attempt to restart all running Web services, yet if either the stop or restart commands are not successful within two minutes, the computer will restart:
IISRESET /RESTART /TIMEOUT:120 /REBOOTONERROR
The purpose of the following commands, when saved to a batch file, is to stop all running Web services, copy the log files for the default Web server to a backup directory on the D: drive, and then start all Web services. However, if the stop command fails for some reason, it will not shut down the services, but simply exit the batch file:
@echo off
IISRESET /STOP /NOFORCE
if errorlevel == 1 goto EXIT
copy %systemroot%system32LogFilesW3SVC1 d:backupW3SVC1
IISRESET /START
:EXIT
Any of the preceding examples can be scheduled to run during non-peak hours for your server using Task Scheduler. For more information on how to accomplish this, search for Task Scheduler in Windows Help.


댓글 없음: