giovanilg Posted September 17, 2011 Share Posted September 17, 2011 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 More sharing options...
PsaltyDS Posted September 17, 2011 Share Posted September 17, 2011 #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() 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 More sharing options...
giovanilg Posted September 27, 2011 Author Share Posted September 27, 2011 (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() 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 September 27, 2011 by giovanilg Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now