mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Reports if Exchange cluster node is active or passive

Author Message
pr

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 11/16/2009
  • Status: offline
Reports if Exchange cluster node is active or passive Wednesday, September 01, 2010 1:15 AM (permalink)
0
The code below is useful if you have a large Exchange cluster environment. Now trying to get this code to loop through a list of nodes in a text file then enumerate the output.
 
'code
'--------------------------------------------------------------------
strComputer = Inputbox("Cluster Node to connect to?")
arrTargetProcs = Array("store.exe")
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("SELECT * FROM Win32_Process")
For Each objProcess in colProcesses
  For Each strTargetProc In arrTargetProcs
    If LCase(objProcess.Name) = LCase(strTargetProc) Then
MsgBox "Exchange is running therefore this is the active node"
wscript.echo strComputer & "," & " " & "Exchange is running therefore this is the active node"
wscript.quit
    
    End If
  Next
 
Next
MsgBox "Exchange is not running therefore this is the passive node"
'</script>
wscript.echo strComputer & "," & " " & "Exchange is not running therefore this is the passive node"
<message edited by pr on Wednesday, September 01, 2010 2:27 AM>
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com