'scirpt'에 해당되는 글 1건
- 2009.03.05 Stop a Web Server
출처 : http://www.microsoft.com/technet/scriptcenter/scripts/sus/default.mspx?mfr=true
Stop a Web Server
Description
Stops an IIS Web server named W3SVC/2142295254.
Supported Platforms
Windows Server 2003 |
Yes |
Windows XP |
No |
Windows 2000 |
No |
Windows NT 4.0 |
No |
Windows 98 |
No |
Script 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.Stop Next
실행 방법
상기 스크립트를 StopWebSite.vbs 파일로 생성하고,
c:\>cscript StopWebSite.vbs
와 같이 실행한다.
또는 배치파일에서 호출한다.