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

PowerShell: Create Mailbox Report on Office 365

# connect-to-exchange-online.ps1 # How to connect to Office 365 Cloud Services using PowerShell # Office…

ASCII Characters

DEC OCT HEX Symbol HTML Number Description 32 040 20     Space 33 041…

Python: RegEx Module

It's been opinionated that a string operation is made complete only with RegEx. Hence, Python…