Restart Windows service via PowerShell

We have already reported on how PowerShell handles Windows services in the past. We showed you how to stop, start and change the start type of Windows services using PowerShell .

But today we would like to go into more detail about the PowerShell command, how to stop and restart Windows services with one command.

To do this, simply open the PowerShell console with administrator rights and use the PowerShell command to restart

Restart service

The name of the Windows service is the only parameter to be appended to the command. In our example, we have selected the Windows update service “Wuauserv” , which we would like to stop and restart. This then works as follows

Restart service “Windows Update”

or with

Restart service wuauserv

We have exemplified the process here below.

Restart service

It is important that you have to consider using the service name or the display name of the Windows service.

The correct spelling of the display name or the service name of the Windows service can be found in the Windows service management “services.msc” .

We have also shown this to you below.

If you use the display name, you must note that some services also have a space between the words. For this reason, the service display name must also be checked ” , otherwise the execution of the command will be acknowledged with an error message .

You can simply enter the ” Restart service ” command and then press the Tab key. Then the PowerShell console shows you the next Windows service in alphabetical order each time you press the Tab key, so that you can also find the service you want.

 

administrator