34 lines
702 B
PowerShell
34 lines
702 B
PowerShell
$ErrorActionPreference = "Continue"
|
|
|
|
$servicesList = [ordered]@{
|
|
_ngateway = "api-gateway"
|
|
_turnaroundservice = "TurnaroundService.api"
|
|
_frontend = "frontend"
|
|
_reportsworker = "ReportsWorker.Api"
|
|
_dashboardsworker = "DashboardsWorker.Api"
|
|
_primaveraconnector = "PrimaveraWorker.Api"
|
|
_sapworker = "SapWorker.Api "
|
|
_nginx = "nginx"
|
|
}
|
|
|
|
|
|
$servicesList.Keys |foreach-Object{
|
|
write-output "stop the service : " $_
|
|
|
|
write-output $servicesList.$_
|
|
|
|
#Stop-Service $_
|
|
|
|
#Sleep 1 second
|
|
sleep 1
|
|
|
|
Get-Process $servicesList.$_ |ForEach-Object {
|
|
write-output $PSItem.Id
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Get-Process TurnaroundService.api |