Answer the question
In order to leave comments, you need to log in
How to determine that the service has started?
There are several services that must be started after one particular one. You have to wait until it is fully loaded. An attempt to force the service to start in a job was not successful. Maybe someone solved this issue?
Answer the question
In order to leave comments, you need to log in
how do you determine that the service has fully loaded?
if it changes to running status then:
$service_name = "winrm"
do{
$service_status = (get-service $service_name).status
if ($service_status -ne "running"){
"Service $service_name is not running!"
}
else {
"Service $service_name has started. Exiting..."
}
sleep 1
}
while($service_status -ne "running")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question