Try cluster.exe
PS > CLUSTER <clusterName> GROUP <groupName> /STATUS
Listing status for resource group 'groupName':
Group Node Status
-------------------- --------------- ------
groupName nodeName Online
Or using WMI, this will get all groups active nodes:
PS> Get-WMIObject MSCluster_ResourceGroup -ComputerName clusterName -Namespace
root\mscluster | Format-Table Name,__Server
To filter a specific group name:
PS> Get-WMIObject MSCluster_ResourceGroup -ComputerName clusterName -Namespace
root\mscluster -filter "name='groupName'"| Format-Table Name,__Server
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar:
http://tinyurl.com/PSToolbar
P> I need to be able to code a script in PowerShell, VBS or Perl to
P> learn which node is active. I have been unsuccessful so far in
P> learning how to do this on a Windows Server 2008 64 bit server,
P> running Exchange 2007.
P>
P> I have found references for pre-2008 and 2008-R2 looks like it will
P> have some nice cmdlets in it, but unfortunately that is in the future
P> and I need to learn how to do now.
P>
P> Any references or code is appreciated.
P>
P>
http://www.pbbergs.com
P>
P> Please no e-mails, any questions should be posted in the NewsGroup
P> This posting is provided "AS IS" with no warranties, and confers no
P> rights.
P>