I have a script that runs on both the active and passive nodes and I need it to figure out if it's currently on the active node or not. I've found a little info on that with the following commands, but I want to use an if statement to filter if I'm on the active or passive node currently or not. Does anyone have any ideas how to do that? This is what I found so far:
Get-WmiObject -Class "Win32_computersystem" | Format-List -Property *
from [properties of system][1]
Get-WMIObject Win32_ComputerSystem -ComputerName {ClusterName}
from [list active node in cluster][2]
I'm just not sure how to use that to see if the current node is the active one.
[1]: http://stackoverflow.com/questions/7259142/how-to-see-all-properties
[2]: http://social.technet.microsoft.com/Forums/en-US/cd67c370-8064-400a-9b10-b5d590740bc2/powershell-command-to-list-active-node-in-cluster
↧
How to tell if current node is active or passive in failover cluster?
↧