shajilcv
-
Total Posts
:
1
- Scores: 0
-
Reward points
:
0
- Joined: 6/23/2011
-
Status: offline
|
VB Script to see apppool status.
Thursday, June 23, 2011 10:49 PM
( permalink)
i am running below script to get the app pool status. i am getting below error. can anyone help me on this Line:6 Char:1 Error : Invalid namespace. code ------------------------------------------------------------------------------------------------------------------ StrServer = "server1" Set locatorObj = CreateObject("WbemScripting.SWbemLocator") locatorObj.Security_.AuthenticationLevel = WbemAuthenticationLevelPktPrivacy Set ProviderObj = locatorObj.ConnectServer(strServer, "domain\username") strQuery = "Select * from IIsApplicationPoolSetting" For Each Item In ProviderObj.ExecQuery(strQuery) AppName = Replace(Item.Name, "W3SVC/AppPools/", "") Select Case Item.AppPoolState Case 1 State = "Starting" Case 2 State = "Running" Case 3 State = "Stopping" Case 4 State = "Stopped" Case else State = "unknown" End Select Next
|
|
|
|