[windows] disable Windows Update Medic Service (#8431)

Related: https://github.com/actions/runner-images-internal/issues/5463
This commit is contained in:
ilia-shipitsin
2023-10-06 02:14:06 +02:00
committed by GitHub
parent 0795b9ed8b
commit f6b2dd2ddd

View File

@@ -49,6 +49,9 @@ Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask
Write-Host "Disable 'Allow your PC to be discoverable by other PCs' popup"
New-Item -Path HKLM:\System\CurrentControlSet\Control\Network -Name NewNetworkWindowOff -Force
Write-Host 'Disable Windows Update Medic Service'
Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\WaaSMedicSvc -Name Start -Value 4 -Force
Write-Host "Disable Windows Update"
Disable-WindowsUpdate
@@ -73,4 +76,4 @@ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name
$driveLetter = "C"
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
Resize-Partition -DriveLetter $driveLetter -Size $size.SizeMax
Get-Volume | Select-Object DriveLetter, SizeRemaining, Size | Sort-Object DriveLetter
Get-Volume | Select-Object DriveLetter, SizeRemaining, Size | Sort-Object DriveLetter