Test Cluster Node

  • Follow


Given a computer name, how to test it if it a cluster node or not? without 
calling WMI MSCluster with $null return? Are there any classes with a 
property of IsClustered?

Thanks,

Ben
0
Reply Utf 11/10/2009 6:01:02 PM

Only WMI classes i can find that relate to clustering are listed here - 
http://technet.microsoft.com/en-us/library/cc780572(WS.10).aspx#w2k3tr_scl_tools_ftwq

but I think you are aware of these.  Is there a Registry key that defines a 
server as a cluster member?
-- 
Richard Siddaway
All scripts are supplied "as is" and with no warranty 
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Ben" wrote:

> Given a computer name, how to test it if it a cluster node or not? without 
> calling WMI MSCluster with $null return? Are there any classes with a 
> property of IsClustered?
> 
> Thanks,
> 
> Ben
0
Reply Utf 11/10/2009 7:30:01 PM


Hi Ben,

to achieve what you want, I was using WMI. Do you have any problem with that 
approach?

Martin

"Ben" <Ben@discussions.microsoft.com> wrote in message 
news:D73502E4-1738-4827-95A0-3BAD47C562C7@microsoft.com...
> Given a computer name, how to test it if it a cluster node or not? without
> calling WMI MSCluster with $null return? Are there any classes with a
> property of IsClustered?
>
> Thanks,
>
> Ben 

0
Reply Martin 11/10/2009 8:49:50 PM

Check if Cluster Service is installed, and if it's running. That might give 
you some indications if it's a cluster node.

But WMI classes would be your most reliable answer, imho.

Jason

"RichS [MVP]" wrote:

> Only WMI classes i can find that relate to clustering are listed here - 
> http://technet.microsoft.com/en-us/library/cc780572(WS.10).aspx#w2k3tr_scl_tools_ftwq
> 
> but I think you are aware of these.  Is there a Registry key that defines a 
> server as a cluster member?
> -- 
> Richard Siddaway
> All scripts are supplied "as is" and with no warranty 
> PowerShell MVP
> Blog: http://richardsiddaway.spaces.live.com/
> PowerShell User Group: http://www.get-psuguk.org.uk
> 
> 
> "Ben" wrote:
> 
> > Given a computer name, how to test it if it a cluster node or not? without 
> > calling WMI MSCluster with $null return? Are there any classes with a 
> > property of IsClustered?
> > 
> > Thanks,
> > 
> > Ben
0
Reply Utf 11/11/2009 3:28:14 AM

Hi, RichS, Jason and Martin,

I am able to use WMI classes. It works great for a cluster node. But if it 
is a non-cluster node, the testing takes a long time and errors out with 
return value $null. How to work around this?

"Martin Zugec" wrote:

> Hi Ben,
> 
> to achieve what you want, I was using WMI. Do you have any problem with that 
> approach?
> 
> Martin
> 
> "Ben" <Ben@discussions.microsoft.com> wrote in message 
> news:D73502E4-1738-4827-95A0-3BAD47C562C7@microsoft.com...
> > Given a computer name, how to test it if it a cluster node or not? without
> > calling WMI MSCluster with $null return? Are there any classes with a
> > property of IsClustered?
> >
> > Thanks,
> >
> > Ben 
> 
> .
> 
0
Reply Utf 11/11/2009 12:24:01 PM

Hi Ben,

you will need to test this, however this could help.

Cluster is using MSCluster namespace. So what you can do is that
instead of retrieving class instance, you can run list against this
namespace:
Get-WmiObject -Namespace "Root\MSCluster" -List

Let me know if it helps,
Martin
0
Reply Martin 11/11/2009 12:50:19 PM

Hi, Martin,

Get-WmiObject -Namespace "Root\MSCluster" -List  returns a list of classes 
even from a non-clustered node.

I think it might be better to test if

Get-WmiObject MSCluster_Cluster -Namespace "Root\MSCluster" -eq $null

Thank you!

"Martin Zugec" wrote:

> Hi Ben,
> 
> you will need to test this, however this could help.
> 
> Cluster is using MSCluster namespace. So what you can do is that
> instead of retrieving class instance, you can run list against this
> namespace:
> Get-WmiObject -Namespace "Root\MSCluster" -List
> 
> Let me know if it helps,
> Martin
> .
> 
0
Reply Utf 11/11/2009 4:16:01 PM

6 Replies
351 Views

(page loaded in 0.126 seconds)

8/24/2012 6:59:55 AM


Reply: