PowerShell by Patrik

Restart a Windows Service with PowerShell — The Simple Way

When an application stops responding or needs a refresh, restarting its Windows service is often the quickest fix. With PowerShell, you can do this in just one line.

The simplest method is:

Restart-Service -Name "ServiceName"

Replace "ServiceName" with the actual service name. This command safely stops and starts the service in one step.

If the service is stuck, you can force it:

Restart-Service -Name "ServiceName" -Force

For more control, stop and start it manually:

Stop-Service -Name "ServiceName" -Force
Start-Service -Name "ServiceName"

Search by partial service name

You can search with wildcards using::

Get-Service -Name "PartialName*"

The * acts as a wildcard and matches all services that start with that text.

You can also search by display name:

Get-Service | Where-Object {$_.DisplayName -like "*partialname*"}

This helps you quickly find the correct service before restarting it.

Most service operations require administrator rights, so run PowerShell as Administrator.

These commands give you a fast and reliable way to manage Windows services. Once you understand these basics, troubleshooting system issues becomes much easier.

PowerShell
Windows
Services
Administration
Automation

Comments