FailoverCluster: Recent Cluster Events

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Show all ClusterEvents (starting at 12h ago until now)

$Clusters = Get-SCVMHostCluster | Sort ClusterName
 
Foreach ($Cluster in $Clusters) {
    $FirstNode = ($Cluster.Nodes.ComputerName | Select -f 1)
    #Write-host $Cluster.ClusterName
 
    Write-Host $Cluster.ClusterName -ForegroundColor Green
    Get-WinEvent -ComputerName $FirstNode -FilterHashtable @{LogName="System";ProviderName="Microsoft-Windows-FailoverClustering";StartTime=(Get-Date).AddHours(-12);EndTime=(Get-Date)}
}


Check last Reset of the Recent Cluster Events

(Get-Cluster -Name "<ClusterName>").RecentEventsResetTime


Reset Recent Cluster Events

$Cluster = Get-Cluster -Name "<ClusterName>"
$Cluster.RecentEventsResetTime = (Get-Date)