mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
22 lines
644 B
PowerShell
22 lines
644 B
PowerShell
################################################################################
|
|
## File: Install-Nginx.ps1
|
|
## Desc: Install Nginx
|
|
################################################################################
|
|
|
|
# Stop w3svc service
|
|
Stop-Service -Name w3svc
|
|
|
|
# Install latest nginx in chocolatey
|
|
$installDir = "C:\tools"
|
|
Install-ChocoPackage nginx -ArgumentList "--force", "--params", "/installLocation:$installDir /port:80"
|
|
|
|
# Stop and disable Nginx service
|
|
Stop-Service -Name nginx
|
|
Set-Service -Name nginx -StartupType Disabled
|
|
|
|
# Start w3svc service
|
|
Start-Service -Name w3svc
|
|
|
|
# Invoke Pester Tests
|
|
Invoke-PesterTests -TestFile "Nginx"
|