<%
Dim ServerObj
'Stop the second Web server.
Set ServerObj = GetObject("IIS://LocalHost/W3SVC/2")
ServerObj.Stop
ServerObj.Start
%>
注意一下这个里边的字符串:
GetObject("IIS://LocalHost/W3SVC/2")
Web virtual servers are identified in the metabase by their index numbers. The first Web server is number 1, the second is number 2, and so on.
IIS://MachineName/W3SVC/N
where MachineName can be any computer name or "LocalHost."