question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add -Wait parameter to Restart-Service (and other applicable *-Service cmdlets)

See original GitHub issue

Summary of the new feature/enhancement

Add a -Wait parameter to Restart-Service so that it blocks until the service has restarted.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vexx32commented, Sep 5, 2019

Is this not its standard behaviour? At least, it was in Windows PowerShell…

0reactions
kvprasooncommented, Oct 29, 2019

It seems the original issue I opened here is already addressed (where the converse can be done with jobs quite easily).

Nothing new, this info was missing here 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing services - PowerShell
The Set-Service cmdlet changes the properties of a service on a local or remote computer. Because the service status is a property, you...
Read more >
Learn PowerShell Start Service and other cmdlets for ...
Need to know how to use PowerShell start service and other cmdlets for Windows Services? Maybe how to get service status? Find this...
Read more >
Powershell Wait for service to be stopped or started
# Wait for services to be stopped or stop them $ServicesToStop | ForEach-Object { $MyService = Get-Service -Name $_ -ComputerName $Server; while ...
Read more >
The "proper" way to test if a service is running in a script
I assumed there's a command made for scripts with simple output or a return value I can check. But Googling around only yields...
Read more >
Is there a way to start or stop a service from powershell ...
The PowerShell cmdlets Stop-Service and Start-Service will wait until the services are fully stopped and started respectively. You can use the - ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found