Set AppPoolName using Script

Posted on June 17, 2008. Filed under: Internet Information Services | Tags: , |

On error Resume Next
set vdirObj= _
GetObject(“IIS://localhost/W3svc/1/Root/Documentation”)
ObjAppPool =  vdirObj.AppPoolId
vdirObj.AppPoolId = “Documentation”
vdirObj.SetInfo
wscript.echo “Stopping Application Pool : ” & vdirObj.AppPoolId
Set objAppPool = GetObject(“IIS://localhost/W3SVC/AppPools/” & vdirObj.AppPoolId)
objAppPool.Stop()
wscript.echo “Starting Application Pool : ” & vdirObj.AppPoolID
objAppPool.Start()

Make a Comment

Make a Comment: ( None so far )

blockquote and a tags work here.

Liked it here?
Why not try sites on the blogroll...