Powershell

How to Use the Start-Service (Microsoft.PowerShell.Management) Cmdlet in PowerShell?

PowerShell’s “Start-Service” cmdlet is used to start one or more services. It sends a message to the “Windows Service Controller” to start a specified service. If the particular service is already running, PowerShell will ignore the message without any error. Stopped services can be specified to the “Start-Service” cmdlet by their names and display names. The standard alias for the “Start-Service” cmdlet is “sasv”.

This article will talk about the usage of PowerShell’s “Start-Service” cmdlet.

How to Use the Start-Service (Microsoft.PowerShell.Management) Cmdlet in PowerShell?

To use the “Start-Service” cmdlet, first, specify the stated cmdlet. Then, write the “-Name” parameter and assign the service to start.

Let’s overview the provided examples to learn the practical usage of the “Start-Service” cmdlet.

Example 1: Use the “Start-Service” Cmdlet to Start a Service by Name
First, use the “Start-Service” cmdlet. Then, use the “-Name” parameter and assign a service name to start:

Start-Service -Name "WinRM"

Execute the below-stated command to verify whether the service was started or not:

Get-Service -Name "WinRM"

Example 2: Use the “Start-Service” Cmdlet to Start a Service by Display Name
To initiate a service by its display name, first, use the parameter “-DisplayName” and provide it the display name of the service:

Start-Service -DisplayName "Work Folders"

Example 3: Use the “Start-Service” Cmdlet to Get the Information of the Service Without Starting it
To retrieve the service information before starting it, specify the “-WhatIf” parameter along with the “Start-Service” cmdlet:

Start-Service -Name "W32Time" -WhatIf

Example 4: Use the “Start-Service” Cmdlet to Start Multiple Services
First, use the “Start-Service” cmdlet. Then, write the “-Name” parameter and assign it multiple values separated by commas:

Start-Service -Name Wecsvc, WebClient, Spooler

That’s it! You have learned the usage of the “Start-Service” cmdlet in PowerShell.

Conclusion

The “Start-Service” cmdlet is used to start one or more stopped services in PowerShell. This cmdlet sends the message to Windows to start a specified service. If the service is already running then the message will be overlooked without displaying an error message. This guide elaborated on the usage of the “Start-Service” cmdlet in PowerShell.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.