Skip to main content

Powershell

Récupérer l'uptime d'un PC:
$OS = Get-CimInstance Win32_OperatingSystem
$Uptime = (Get-Date) - $OS.LastBootUpTime

Write-Host "Dernier démarrage : $($OS.LastBootUpTime)"
Write-Host "Uptime : $($Uptime.Days) jours, $($Uptime.Hours) heures, $($Uptime.Minutes) minutes"

Vérifier l'état de l'installation de Windows:
DISM /Online /Cleanup-Image /ScanHealth
sfc /verifyonly
Lancer la réparation de Windows:
DISM /Online /Cleanup-Image /RestoreHealth

Si DISM réussi, on peut lancer:

sfc /scannow