[Windows] Unify services handling (#8871)

* [Windows] Unify services handling

* Fix Set-Service usage
This commit is contained in:
Vasilii Polikarpov
2023-11-23 18:08:20 +01:00
committed by GitHub
parent 6efbc46fc7
commit 79c347765a
8 changed files with 21 additions and 102 deletions

View File

@@ -78,7 +78,7 @@ if ($exitCode -ne 0) {
# Stop and disable PostgreSQL service
$pgService = Get-Service -Name postgresql*
Stop-Service -InputObject $pgService
Set-Service -InputObject $pgService -StartupType Disabled
Stop-Service $pgService
$pgService | Set-Service -StartupType Disabled
Invoke-PesterTests -TestFile "Databases" -TestName "PostgreSQL"