mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
[windows] disable Windows Update Medic Service (#8431)
Related: https://github.com/actions/runner-images-internal/issues/5463
This commit is contained in:
@@ -49,6 +49,9 @@ Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask
|
|||||||
Write-Host "Disable 'Allow your PC to be discoverable by other PCs' popup"
|
Write-Host "Disable 'Allow your PC to be discoverable by other PCs' popup"
|
||||||
New-Item -Path HKLM:\System\CurrentControlSet\Control\Network -Name NewNetworkWindowOff -Force
|
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"
|
Write-Host "Disable Windows Update"
|
||||||
Disable-WindowsUpdate
|
Disable-WindowsUpdate
|
||||||
|
|
||||||
@@ -73,4 +76,4 @@ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name
|
|||||||
$driveLetter = "C"
|
$driveLetter = "C"
|
||||||
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
|
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
|
||||||
Resize-Partition -DriveLetter $driveLetter -Size $size.SizeMax
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user