mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 10:09:20 +08:00
Adjust services handling in Finalize-VM and helpers (#8771)
This commit is contained in:
committed by
GitHub
parent
286fb24a63
commit
495f740eda
@@ -104,10 +104,8 @@ $servicesToDisable = @(
|
||||
'StorSvc'
|
||||
)
|
||||
|
||||
$servicesToDisable | ForEach-Object {
|
||||
Stop-Service -Name $_
|
||||
Set-Service -Name $_ -StartupType Disabled -ErrorAction Ignore
|
||||
} | Out-Null
|
||||
$servicesToDisable | Stop-SvcWithErrHandling
|
||||
$servicesToDisable | Set-SvcWithErrHandling -Arguments @{StartupType = "Disabled"}
|
||||
|
||||
# Disable scheduled tasks
|
||||
$allTasksInTaskPath = @(
|
||||
|
||||
Reference in New Issue
Block a user