Sign in to follow this  
Followers 0
giovanilg

IIS Application Pools Status

3 posts in this topic

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()

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#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

Share this post


Link to post
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
Sign in to follow this  
Followers 0