Can any one tell me why I am getting an error message with this code: I am trying to recycle app pools with a wmi script
Line that errors is "set objWMIService ..."
Error message is "0x8004100E"
RecycleAppPools("myComputerName")
Sub RecycleAppPools(strComputer)
set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}//" _
& strComputer & "/root/MicrosoftIISv2")
Set colItems = objWMIService.ExecQuery _
("Select * From IIsApplicationPool ")
For Each objItem in colItems
objItem.Recycle
Next
End Sub
User contributions licensed under CC BY-SA 3.0