Files
runner-images-sangeeth/images/windows/scripts/build/Install-Apache.ps1
Vasilii Polikarpov d3e630f774 [Windows] Implement installation helpers refactoring (#8865)
* [Windows] Refactor base Installer helper functions

* Fix helper name

* Fix name gen logic and improve error handling

* Fix hash checking logic

* Fix Install-VsixExtension invocation

* Fix variable name in Install-OpenSSL.ps1

* Fix type for git downloadUrl
2023-11-22 15:14:08 +01:00

22 lines
686 B
PowerShell

################################################################################
## File: Install-Apache.ps1
## Desc: Install Apache HTTP Server
################################################################################
# Stop w3svc service
Stop-Service -Name w3svc | Out-Null
# Install latest apache in chocolatey
$installDir = "C:\tools"
Install-ChocoPackage apache-httpd -ArgumentList "--force", "--params", "/installLocation:$installDir /port:80"
# Stop and disable Apache service
Stop-Service -Name Apache
Set-Service Apache -StartupType Disabled
# Start w3svc service
Start-Service -Name w3svc | Out-Null
# Invoke Pester Tests
Invoke-PesterTests -TestFile "Apache"