You are here

Error message

  • Deprecated function: Array and string offset access syntax with curly braces is deprecated in include_once() (line 20 of /home/benjfc5/public_html/main/includes/file.phar.inc).
  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /home/benjfc5/public_html/main/includes/bootstrap.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/benjfc5/public_html/main/includes/common.inc).

PowerShell - Find Active Node On Cluster

Microsoft Failover Cluster Documentation For PowerShell

This script only works on a clustered environment on Windows 2008 R2/2012. This does not work on Windows 7. If you're on a Windows 7 machine then you must RDP into a server with the required services and OS. For more information, see the related TechNet article.

Import-Module failoverclusters
$activeNode = Get-ClusterGroup|Select OwnerNode -unique #OR #$activeNode = Get-ClusterGroup -Cluster (Get-Cluster)|Select OwnerNode -unique
$passiveNode = Get-ClusterNode|Select Name|Where-Object {$_.name -ne $activeNode.OwnerNode}
$thisNode = Get-Content env:COMPUTERNAME

if($activeNode.OwnerNode.Name -eq $thisNode){ echo "Active"}else{ echo "Passive"} 

Categories: 
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
1 + 12 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer