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: Time Stamp Variable

This is useful in almost any script as it enables the accurate timestamp of log…

PowerShell: List Biggest Files and Folders on a Volume

# listBigFilesAndFolders-v0.01.ps1 # Set variables $parentDirectory="C:\" $depth=4 $topX=10 $excludeDirectories="C:\Windows","C:\Program Files","C:\Program Files (x86)" $clusterSizeOfNetworkShare=8192 # Sanitize…

Basic CSS: Set the id of an Element

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"><style> .red-text { color: red; } h2 { font-family: Lobster, monospace; }…
Other project: DragonCoin.com