Posted On August 21, 2020

PowerShell: Get Quorums of All Clusters in the Domain

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> PowerShell: Get Quorums of All Clusters in the Domain
# getClusterQuorum.ps1

function getClusterQuorum{
    $allClusters=(get-cluster -domain $env:USERDNSDOMAIN).Name
    $results=@{}
    foreach ($cluster in $allClusters){
        $quorum=Get-ClusterQuorum -Cluster $cluster -ea SilentlyContinue
        if($quorum){
            $quorumResource=$quorum.QuorumResource
            $results+=@{$cluster=if($quorumResource){$quorumResource}else{'None'}}
        }else{
            $results+=@{$cluster='None'}
            }
        }
    return $results
}
getClusterQuorum

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Enable Jumbo Frames on a Windows Host

Overview: Whether the engineer or sysadmin works in the realm of 'networking', 'database', or 'Windows',…

PowerShell: Combine Objects

By default, a PowerShell Custom Object cannot be added to another. This would be the…

CSS: Units of Measurement

Common Values of Measurement px :pixelin :inchesmm :millimetersem :relative to nearest parent element's set value…