From 5cd4e99465444aa6219187ed864c3454cd2e8e3e Mon Sep 17 00:00:00 2001 From: David Yoder Date: Thu, 5 Oct 2023 14:10:02 -0400 Subject: [PATCH] very minor changes --- Fix-WindowsHealth.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Fix-WindowsHealth.ps1 b/Fix-WindowsHealth.ps1 index 66d0358..107adaa 100644 --- a/Fix-WindowsHealth.ps1 +++ b/Fix-WindowsHealth.ps1 @@ -11,6 +11,7 @@ If ( $SFCOutput -contains 'Windows Resource Protection did not find any integrit # Run enhanced DISM for Windows 8 and higher endpoints If ( IsWindowsVersion -ge "6.2" ) { + # Record start of DISM repair $BeginDISMRun = (Get-Date) Write-Output "Beginning repair of Windows Component Store" @@ -19,9 +20,10 @@ If ( IsWindowsVersion -ge "6.2" ) Write-Output "Beginning cleanup of superceded components in Windows Component Store" Start-Process "dism.exe" -ArgumentList "/online /cleanup-image /startcomponentcleanup" -Wait - $EndDISMRun = $(Get-Date).AddSeconds(1) + # Record end of DISM repair + $EndDISMRun = (Get-Date) - # Adding results of DISM log file to this log file + # Extract results of DISM repair from system log and add them to this log Write-Output "Beginning Windows Component Store log data collection" Get-Content -Path "${Env:WinDir}\Logs\DISM\dism.log" | Select-String -Pattern '^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})' | ForEach-Object {