mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[Windows] Unify services handling (#8871)
* [Windows] Unify services handling * Fix Set-Service usage
This commit is contained in:
committed by
GitHub
parent
6efbc46fc7
commit
79c347765a
@@ -4,7 +4,7 @@
|
||||
################################################################################
|
||||
|
||||
# Stop w3svc service
|
||||
Stop-Service -Name w3svc | Out-Null
|
||||
Stop-Service -Name w3svc
|
||||
|
||||
# Install latest nginx in chocolatey
|
||||
$installDir = "C:\tools"
|
||||
@@ -12,10 +12,10 @@ Install-ChocoPackage nginx -ArgumentList "--force", "--params", "/installLocatio
|
||||
|
||||
# Stop and disable Nginx service
|
||||
Stop-Service -Name nginx
|
||||
Set-Service nginx -StartupType Disabled
|
||||
Set-Service -Name nginx -StartupType Disabled
|
||||
|
||||
# Start w3svc service
|
||||
Start-Service -Name w3svc | Out-Null
|
||||
Start-Service -Name w3svc
|
||||
|
||||
# Invoke Pester Tests
|
||||
Invoke-PesterTests -TestFile "Nginx"
|
||||
|
||||
Reference in New Issue
Block a user