Add -Wait parameter to Restart-Service (and other applicable *-Service cmdlets)
See original GitHub issueSummary of the new feature/enhancement
Add a -Wait
parameter to Restart-Service
so that it blocks until the service has restarted.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this not its standard behaviour? At least, it was in Windows PowerShell…
Nothing new, this info was missing here 😃