Update Invoke-WPFUpdatesdisable.ps1 to not require a restart (#4288)

* Update Invoke-WPFUpdatesdisable.ps1 to not require a restart

* Update Invoke-WPFUpdatesdisable.ps1

* Update Invoke-WPFUpdatesdefault.ps1

* Merge branch 'ChrisTitusTech:main' into patch-9
This commit is contained in:
Gabi
2026-04-02 13:07:34 -07:00
committed by GitHub
parent 74f990028f
commit 1eba305fab
2 changed files with 2 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ function Invoke-WPFUpdatesdefault {
Set-Service -Name wuauserv -StartupType Manual Set-Service -Name wuauserv -StartupType Manual
Write-Host "Restored UsoSvc to Automatic" Write-Host "Restored UsoSvc to Automatic"
Start-Service -Name UsoSvc
Set-Service -Name UsoSvc -StartupType Automatic Set-Service -Name UsoSvc -StartupType Automatic
Write-Host "Restored WaaSMedicSvc to Manual" Write-Host "Restored WaaSMedicSvc to Manual"

View File

@@ -26,6 +26,7 @@ function Invoke-WPFUpdatesdisable {
Set-Service -Name wuauserv -StartupType Disabled Set-Service -Name wuauserv -StartupType Disabled
Write-Host "Disabled UsoSvc Service" Write-Host "Disabled UsoSvc Service"
Stop-Service -Name UsoSvc -Force
Set-Service -Name UsoSvc -StartupType Disabled Set-Service -Name UsoSvc -StartupType Disabled
Remove-Item "C:\Windows\SoftwareDistribution\*" -Recurse -Force Remove-Item "C:\Windows\SoftwareDistribution\*" -Recurse -Force