Short answer Check service state, startup mode and process identity, then restart only when appropriate.
When to use it
When an application service is stopped or fails at startup.
Inspect service
Get-CimInstance Win32_Service -Filter "Name='<SERVICE_NAME>'" | Select-Object Name,State,StartMode,StartName,ProcessId,ExitCodeNote
Use the service name, not display name.
Controlled restart
Restart-Service -Name "<SERVICE_NAME>" -Force -PassThru
Get-Service -Name "<SERVICE_NAME>"Note
Assess impact first.
Caution
Do not restart production, database or domain-controller services without dependency checks.