Closed bax99 closed 2 years ago
Hi, This bunch of script make otimize.ps1 runs forever on Windows 10 2004.
Write-Host 'Running Automatic Maintenance...' MSchedExe.exe Start Wait-Condition {@(Get-ScheduledTasks | Where-Object {($.State -ge 4) -and (Test-IsMaintenanceTask $.XML)}).Count -eq 0} -DebounceSeconds 60
It is fine for Windows 2019 though.
Any idea?
Thanks
It works fine here, so I have no idea.
That step is not strictly required (it just helps reducing the final image size), so you can comment it and try again.
Closing this as "works-for-me".
Hi, This bunch of script make otimize.ps1 runs forever on Windows 10 2004.
Write-Host 'Running Automatic Maintenance...' MSchedExe.exe Start Wait-Condition {@(Get-ScheduledTasks | Where-Object {($.State -ge 4) -and (Test-IsMaintenanceTask $.XML)}).Count -eq 0} -DebounceSeconds 60
It is fine for Windows 2019 though.
Any idea?
Thanks