powershell restart service command code example
Example: Status Name DisplayName ------ ---- ----------- Stopped W32Time Windows Time fix
PS C:\> Get-Service -Name "net*" | Where-Object {$_.Status -eq "Stopped"} | Restart-Service
PS C:\> Get-Service -Name "net*" | Where-Object {$_.Status -eq "Stopped"} | Restart-Service