Dim WebServiceObj
'Get the Web service object, which contains servers.
Set WebServiceObj = GetObject("IIS://LocalHost/W3SVC")
'Delete the fourth server.
WebServiceObj.Delete "IIsWebServer", "4"
Dim WebServiceObj
'Get the Web service object, which contains servers.
Set WebServiceObj = GetObject("IIS://LocalHost/W3SVC")
'Delete the fourth server.
WebServiceObj.Delete "IIsWebServer", "4" '根据你的需要删除的第n个站点