Skip to content

Commit

Permalink
Update func_getfailoverhistory.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Polonius19 committed Oct 7, 2012
1 parent a9f6cd9 commit f91940d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions func_getfailoverhistory.ps1
Expand Up @@ -23,15 +23,15 @@
$clusternode = Get-WmiObject -Class mscluster_node -Authentication PacketPrivacy -Impersonation Impersonate -namespace root\mscluster -ComputerName $server | Select-Object Name $clusternode = Get-WmiObject -Class mscluster_node -Authentication PacketPrivacy -Impersonation Impersonate -namespace root\mscluster -ComputerName $server | Select-Object Name


# Remove duplicates and sort alphabetically # Remove duplicates and sort alphabetically
$uniquenode = $null $uniquenode = $null
$uniquenode = $clusternode | Select-Object Name -Unique $uniquenode = $clusternode | Select-Object Name -Unique


# Change $uniquenode type to string # Change $uniquenode type to string
$uniquenodeSTR = $null $uniquenodeSTR = $null
$uniquenodeSTR = @() $uniquenodeSTR = @()
foreach ($nodeA in $uniquenode) { foreach ($nodeA in $uniquenode) {
[string]$string = $nodeA [string]$string = $nodeA
$uniquenodeSTR += [regex]::matches($string, "[Pp][Rr][BXVbxv][\w]{6}[\d]{3}[A-Ea-e]?") | foreach {$_.value } $uniquenodeSTR += [regex]::matches($string, "[Pp][Rr][BXVbxv][\w]{6}[\d]{3}[A-Ea-e]?") | foreach {$_.value }
} }


foreach ($nodeB in $uniquenodeSTR) { foreach ($nodeB in $uniquenodeSTR) {
Expand Down

0 comments on commit f91940d

Please sign in to comment.