FailoverCluster: Recent Cluster Events: Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) K (Admin verschob die Seite FailoverCluster: Get-ClusterEvents nach FailoverCluster: Recent Cluster Events, ohne dabei eine Weiterleitung anzulegen) |
Admin (Diskussion | Beiträge) |
||
Zeile 11: | Zeile 11: | ||
} | } | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | == Check last Reset of the Recent Cluster Events == | ||
+ | <source lang="powershell">(Get-Cluster -Name "<ClusterName>").RecentEventsResetTime</source> | ||
+ | |||
+ | |||
+ | == Reset Recent Cluster Events == | ||
+ | <source lang="powershell"> | ||
+ | $Cluster = Get-Cluster -Name "<ClusterName>" | ||
+ | $Cluster.RecentEventsResetTime = (Get-Date) | ||
+ | </source> | ||
+ | |||
+ | |||
Aktuelle Version vom 24. Oktober 2018, 08:03 Uhr
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)