very minor changes

This commit is contained in:
2023-10-05 14:10:02 -04:00
parent 8962142931
commit 5cd4e99465
+4 -2
View File
@@ -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 {