Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Clustering > Which 2008 clustered node is active via script

Reply
Thread Tools Display Modes

Which 2008 clustered node is active via script

 
 
Paul Bergson [MVP-DS]
Guest
Posts: n/a

 
      02-20-2009
I need to be able to code a script in PowerShell, VBS or Perl to learn which
node is active. I have been unsuccessful so far in learning how to do this
on a Windows Server 2008 64 bit server, running Exchange 2007.

I have found references for pre-2008 and 2008-R2 looks like it will have
some nice cmdlets in it, but unfortunately that is in the future and I need
to learn how to do now.

Any references or code is appreciated.


--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


 
Reply With Quote
 
 
 
 
Marco Shaw [MVP]
Guest
Posts: n/a

 
      02-20-2009
Paul Bergson [MVP-DS] wrote:
> I need to be able to code a script in PowerShell, VBS or Perl to learn
> which node is active. I have been unsuccessful so far in learning how
> to do this on a Windows Server 2008 64 bit server, running Exchange 2007.
>
> I have found references for pre-2008 and 2008-R2 looks like it will have
> some nice cmdlets in it, but unfortunately that is in the future and I
> need to learn how to do now.
>
> Any references or code is appreciated.
>
>


I don't know how to set the reply-to so this only continues in one
particular group.

You need to run this locally (COM or even WMI) or remotely (WMI)?

I might be able to check this tomorrow if nobody else does before then.

Marco
 
Reply With Quote
 
Paul Bergson [MVP-DS]
Guest
Posts: n/a

 
      02-20-2009
Locally. Everything I have tried so far has been stopped because I run on
server 2008.



--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


"Marco Shaw [MVP]" <marco.shaw@NO_SPAMgmail.com> wrote in message
news:...
> Paul Bergson [MVP-DS] wrote:
>> I need to be able to code a script in PowerShell, VBS or Perl to learn
>> which node is active. I have been unsuccessful so far in learning how to
>> do this on a Windows Server 2008 64 bit server, running Exchange 2007.
>>
>> I have found references for pre-2008 and 2008-R2 looks like it will have
>> some nice cmdlets in it, but unfortunately that is in the future and I
>> need to learn how to do now.
>>
>> Any references or code is appreciated.
>>
>>

>
> I don't know how to set the reply-to so this only continues in one
> particular group.
>
> You need to run this locally (COM or even WMI) or remotely (WMI)?
>
> I might be able to check this tomorrow if nobody else does before then.
>
> Marco


 
Reply With Quote
 
Missy Koslosky
Guest
Posts: n/a

 
      02-20-2009
(follow-ups set to m.p.e.clustering)

Have you done a Get-MailboxDatabase -status | fl yet? I don't have an
exchange 2007 server around right this second, but there may well be an
attribute in the results that will give you the information you want.

Missy

"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> wrote in message
news:EE8367FB-C1D3-49AB-839A-...
>I need to be able to code a script in PowerShell, VBS or Perl to learn
>which node is active. I have been unsuccessful so far in learning how to
>do this on a Windows Server 2008 64 bit server, running Exchange 2007.
>
> I have found references for pre-2008 and 2008-R2 looks like it will have
> some nice cmdlets in it, but unfortunately that is in the future and I
> need to learn how to do now.
>
> Any references or code is appreciated.
>
>
> --
> Paul Bergson
> MVP - Directory Services
> MCTS, MCT, MCSE, MCSA, Security+, BS CSci
> 2008, 2003, 2000 (Early Achiever), NT4
>
> http://www.pbbergs.com
>
> Please no e-mails, any questions should be posted in the NewsGroup This
> posting is provided "AS IS" with no warranties, and confers no rights.
>
>


 
Reply With Quote
 
Shay Levy [MVP]
Guest
Posts: n/a

 
      02-22-2009
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>


 
Reply With Quote
 
Ed Crowley [MVP]
Guest
Posts: n/a

 
      02-22-2009
This will do it:

(Get-ClusteredMailboxServerStatus -Identity <CMS_Name>).OperationalMachines
| ForEach-Object {If ($_.Contains("Active")) {$ActiveNode = $_.Substring(0,
$_.IndexOf(" "))}}

$ActiveNode will have the name of the active node.
--
Ed Crowley MVP
"There are seldom good technological solutions to behavioral problems."
..

"Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> wrote in message
news:EE8367FB-C1D3-49AB-839A-...
>I need to be able to code a script in PowerShell, VBS or Perl to learn
>which node is active. I have been unsuccessful so far in learning how to
>do this on a Windows Server 2008 64 bit server, running Exchange 2007.
>
> I have found references for pre-2008 and 2008-R2 looks like it will have
> some nice cmdlets in it, but unfortunately that is in the future and I
> need to learn how to do now.
>
> Any references or code is appreciated.
>
>
> --
> Paul Bergson
> MVP - Directory Services
> MCTS, MCT, MCSE, MCSA, Security+, BS CSci
> 2008, 2003, 2000 (Early Achiever), NT4
>
> http://www.pbbergs.com
>
> Please no e-mails, any questions should be posted in the NewsGroup This
> posting is provided "AS IS" with no warranties, and confers no rights.
>
>


 
Reply With Quote
 
Paul Bergson [MVP-DS]
Guest
Posts: n/a

 
      02-23-2009
Spot on!!! Works perfectly.

Thanks!!!

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.


"Ed Crowley [MVP]" <> wrote in message
news:...
> This will do it:
>
> (Get-ClusteredMailboxServerStatus -Identity
> <CMS_Name>).OperationalMachines | ForEach-Object {If
> ($_.Contains("Active")) {$ActiveNode = $_.Substring(0, $_.IndexOf(" "))}}
>
> $ActiveNode will have the name of the active node.
> --
> Ed Crowley MVP
> "There are seldom good technological solutions to behavioral problems."
> .
>
> "Paul Bergson [MVP-DS]" <pbbergs@nopspam_msn.com> wrote in message
> news:EE8367FB-C1D3-49AB-839A-...
>>I need to be able to code a script in PowerShell, VBS or Perl to learn
>>which node is active. I have been unsuccessful so far in learning how to
>>do this on a Windows Server 2008 64 bit server, running Exchange 2007.
>>
>> I have found references for pre-2008 and 2008-R2 looks like it will have
>> some nice cmdlets in it, but unfortunately that is in the future and I
>> need to learn how to do now.
>>
>> Any references or code is appreciated.
>>
>>
>> --
>> Paul Bergson
>> MVP - Directory Services
>> MCTS, MCT, MCSE, MCSA, Security+, BS CSci
>> 2008, 2003, 2000 (Early Achiever), NT4
>>
>> http://www.pbbergs.com
>>
>> Please no e-mails, any questions should be posted in the NewsGroup This
>> posting is provided "AS IS" with no warranties, and confers no rights.
>>
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a 2008 node to 2-node 2003 cluster Jan Clustering 5 05-15-2008 02:28 PM
Active Node Drives Showing in Passive Node Explorer gtlscot Clustering 4 03-10-2008 06:03 PM
Re: Clustered Task Scheduler - Copy password to passive node Rodney R. Fournier [MVP] Clustering 1 04-24-2006 09:02 PM
Re: What is info is written to the Cluster Log on an active node versus a passive node? Gerald Aigenbauer Clustering 0 01-17-2006 02:41 PM
SBS Member Server saying it's a clustered node John Windows Small Business Server 3 06-06-2004 09:36 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59