Initial commit – Milestone monitoring script (SOC09 / CSU Ultreia) – AGPL-3.0

This commit is contained in:
2026-02-19 21:14:17 +01:00
parent 4e8d7b0a2d
commit 5f6c124d62
2 changed files with 126 additions and 0 deletions

63
Milestone_Monitor.ps1 Normal file
View File

@ -0,0 +1,63 @@
$start = (Get-Date).AddDays(-4)
$events = @()
# 🔵 Redémarrages serveur
$events += Get-WinEvent -FilterHashtable @{
LogName='System'
StartTime=$start
} | Where-Object {
($_.Id -eq 12 -and $_.ProviderName -eq "Microsoft-Windows-Kernel-General") -or
($_.Id -eq 41) -or
($_.Id -eq 1074)
} | ForEach-Object {
[PSCustomObject]@{
Time = $_.TimeCreated
Theme = "REDÉMARRAGE SERVEUR"
Detail = $_.Id
}
}
# 🟡 Crash service Recording
$events += Get-WinEvent -FilterHashtable @{
LogName='System'
Id=7031
StartTime=$start
} | Where-Object {$_.Message -like "*Recording Server*"} | ForEach-Object {
[PSCustomObject]@{
Time = $_.TimeCreated
Theme = "CRASH SERVICE RECORDING"
Detail = $_.Id
}
}
# 🔴 Crash application VideoOS
$events += Get-WinEvent -FilterHashtable @{
LogName='Application'
Id=1000
StartTime=$start
} | Where-Object {$_.Message -like "*VideoOS*"} | ForEach-Object {
[PSCustomObject]@{
Time = $_.TimeCreated
Theme = "CRASH APPLICATION VIDEOOS"
Detail = $_.Id
}
}
# 🔶 Service démarré
$events += Get-WinEvent -FilterHashtable @{
LogName='System'
Id=7036
StartTime=$start
} | Where-Object {$_.Message -like "*Recording Server*running*"} | ForEach-Object {
[PSCustomObject]@{
Time = $_.TimeCreated
Theme = "SERVICE RECORDING DÉMARRÉ"
Detail = $_.Id
}
}
# 🔄 Affichage chronologique
$events |
Sort-Object Time |
Format-Table Time, Theme, Detail -AutoSize