All,
Say I have set up a test and I have an action profile assocated with that test but I want to recycle an applicaton pool in IIS rather then restart IIS service. Is there a command I may use for this?
Thanks!
repair server
You may use script like this
====================
AppPoolName = "DefaultAppPool"
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")
Set colItems = objWMIService.ExecQuery _
("Select * From IIsApplicationPool Where Name LIKE '%/" & AppPoolName & "'")
For Each objItem in colItems
objItem.Recycle
Next
Regards
Alex
====================
AppPoolName = "DefaultAppPool"
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")
Set colItems = objWMIService.ExecQuery _
("Select * From IIsApplicationPool Where Name LIKE '%/" & AppPoolName & "'")
For Each objItem in colItems
objItem.Recycle
Next
Regards
Alex