From ab21fb14f3960c3dab04d1fb8ee198988433e9d2 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Fri, 1 Jul 2022 13:14:34 -0400 Subject: [PATCH] wait for component cleanup --- Fix-WindowsHealth.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fix-WindowsHealth.ps1 b/Fix-WindowsHealth.ps1 index 4eea630..17a527d 100644 --- a/Fix-WindowsHealth.ps1 +++ b/Fix-WindowsHealth.ps1 @@ -12,7 +12,7 @@ If ( IsWindowsVersion -ge "6.2" ) Start-Process "dism.exe" -ArgumentList "/online /cleanup-image /restorehealth" -Wait LogMsg "Beginning cleanup of superceded components in Windows Component Store" - Start-Process "dism.exe" -ArgumentList "/online /cleanup-image /startcomponentcleanup" + Start-Process "dism.exe" -ArgumentList "/online /cleanup-image /startcomponentcleanup" -Wait $EndDISMRun = $(Get-Date).AddSeconds(1)