• 1. London, UK
  • 2. New York, NY
  • 3. Sydney, Australia
  • 4. Melbourne, Australia
  • 5. Moscow, Russia
  • 6. Singapore
  • 7. Paris, France
  • 8. Chicago, IL
  • 9. Hong Kong
  • 10. Houston, TX

Friday, January 28, 2005


Scripting: ExchangeClusterResource class

Posted by Bharat Suneja at 1:40 PM
The WMI ExchangeClusterResource class has 5 properties:
1) Name: returns name of Exchange cluster resource
2) Type: specifies the cluster resource type (IP Address, network name, etc.)
3) Owner: specifies the cluster node that the resource is running on (changes with failover)
4) VirtualMachine: returns name of the Virtual Machine that owns the resource
5) State: Shows the current state of resource, returns a numerical value.

The value I get for all online resources is 2 - but I haven't been able to find any cross-reference that translates the numbers into something, except for the Windows Clustering section of the Platform SDK that mentions the following values (not-numerical) for the GetClusterResourceState function.

Return Code Description
ClusterResourceInitializingThe resource is performing initialization.
ClusterResourceOnlineThe resource is operational and functioning normally.
ClusterResourceOfflineThe resource is not operational.
ClusterResourceFailedThe resource has failed.
ClusterResourcePendingThe resource is in the process of coming online or going offline.
ClusterResourceOnlinePendingThe resource is in the process of coming online.
ClusterResourceOfflinePendingThe resource is in the process of going offline.
ClusterResourceStateUnknownThe operation was not successful. For more information about the error, call the Win32 function GetLastError.

Assuming these values map serially to the numerical values returned by the WMI class, 2 would mean the resource is operational and functioning normally.

However, when moving the MSDTC resource, the numerical value returned while the resources were moving was 129. That blows holes in the theory.

Labels: , ,


May 13, 2005 12:03 PM
Blogger azaleos said...


ClusterResourceStateUnknown = -1,
ClusterResourceInherited = 0,
ClusterResourceInitializing = 1,
ClusterResourceOnline = 2,
ClusterResourceOffline = 3,
ClusterResourceFailed = 4,
ClusterResourcePending = 128,
ClusterResourceOnlinePending = 129,
ClusterResourceOfflinePending = 130

March 9, 2006 1:33 AM
Blogger Zavier said...

I need to implement a cluster aware application on Win2003 cluster server with 2 nodes , can you tell me a way to start.

Currently the application works fine as a standalone application.

March 20, 2009 11:50 AM
Blogger Bala said...

Hi All,

I am looking for script for bleow scenario can someone help me.

In our company we have public folders configured with email, daily we get hundreds of emails to those respctive folders i.e public folders, i am looking for script daily how many emails have come to each public folder. can someone help me in this..My mail id is - [email protected]



Post a Comment

Links to this post:

Create a Link

<< Home