Jump to content

IIS Application Pools Status


giovanilg
 Share

Recommended Posts

Hi, I need a little help...

With the code below I can start and stop an application pool in IIS server, but I can't find a way to get a status of this application pool.

I want get a status and after execute the start/stop command.

Thaks.

Global $oAppPool = ObjGet("IIS://localhost/W3SVC/AppPools/ICEBERG")

$oAppPool.Stop()

;~ or

$oAppPool.Start()

Link to comment
Share on other sites

#cs
Return values
0 = Application pool is starting.
1 = Application pool has started.
2 = Application pool is stopping.
3 = Application pool has stopped.
4 = Application pool state is unknown.
#ce
 
$iRET = $oAppPool.GetState()

:graduated:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • 2 weeks later...

#cs
Return values
0 = Application pool is starting.
1 = Application pool has started.
2 = Application pool is stopping.
3 = Application pool has stopped.
4 = Application pool state is unknown.
#ce
 
$iRET = $oAppPool.GetState()

:graduated:

Not work for me...

"The requested action with this object has failed"

Which libraries you add?

#include <NTServices.au3>

#include <INet.au3>

#include <Array.au3>

That's it?

The code:

Global $oAppPool = ObjGet("IIS://localhost/W3SVC/AppPools/ICEBERG")

$iRET = $oAppPool.GetState()

FileWriteLine("status.txt", $iRET)

Edited by giovanilg
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...