PowerShell Restart-Service: Restart Windows Services Command
β’ 2 min read
powershell restart-service services system-administration tutorial
PowerShell Restart-Service: Complete Guide to Restarting Windows Services
Overview
The Restart-Service cmdlet stops and then starts Windows services. Itβs useful for service recovery and troubleshooting without manual intervention.
Common Tasks:
- Restart services for troubleshooting
- Recover stuck services
- Apply service updates
- Restart on remote computers
- Automate service restart procedures
Prerequisites:
- PowerShell 5.1 or later
- Administrator privileges
- Understanding of service dependencies
Syntax
Restart-Service [-Name] <string> [-Force] [-NoWait] [-PassThru] [-ComputerName <string[]>]
```powershell
---
## Examples
### Example 1: Restart Service
```powershell
Restart-Service -Name "Spooler"
```powershell
### Example 2: Force Restart
```powershell
Restart-Service -Name "Spooler" -Force
```powershell
### Example 3: Restart on Remote Computer
```powershell
Restart-Service -Name "Spooler" -ComputerName "server01"
```powershell
### Example 4: Restart Multiple Services
```powershell
"Spooler", "BITS" | Restart-Service
```powershell
### Example 5: Restart Service If Running
```powershell
$service = Get-Service -Name "ServiceName"
if ($service.Status -eq "Running") {
Restart-Service -Name $service.Name
}
```powershell
---
## Common Use Cases
### Recover Stuck Service
```powershell
Restart-Service -Name "ServiceName" -Force
Start-Sleep -Seconds 2
Get-Service -Name "ServiceName" | Select-Object Status
```powershell
### Batch Restart Multiple Services
```powershell
@("Service1", "Service2", "Service3") | Restart-Service -PassThru
```powershell
---
## Best Practices
β
**Check status first** - Verify service is running before restart
β
**Warn dependent services** - Understand what depends on the service
β
**Use graceful restart** - Try without -Force first
β
**Monitor after restart** - Verify service started correctly
### Related Commands
- **[Stop-Service](/powershell-stop-service)** - Stop services
- **[Start-Service](/powershell-start-service)** - Start services
- **[Get-Service](/powershell-get-service)** - Query services
---
## See Also
- **[Get-Service](/powershell-get-service)** - Query services
- **[Stop-Service](/powershell-stop-service)** - Stop services
- **[Start-Service](/powershell-start-service)** - Start services
---
**Last Updated:** February 6, 2026
**Difficulty Level:** Intermediate
**Reading Time:** 8 minutes