Here is a VBScript code to start, stop and pause a web server running in IIS:
Start a Web Server
strComp = "LocalHost"
Set objIIS = GetObject("IIS://" & strComp & "/W3SVC/2142295254")
objIIS.Start
Stop a Web Server
strComp = "LocalHost"
Set objIIS = GetObject("IIS://" & strComp & "/W3SVC/2142295254")
objIIS.Stop
Pause a Web Server
strComp = "LocalHost"
Set objIIS = GetObject("IIS://" & strComp & "/W3SVC/2142295254")
objIIS.Pause
Hope this helps :)
0 comments:
Post a Comment