How to Start,Stop windows services using Powershell?

Windows PowerShell is a powerful tool that is developed by Microsoft for purposes of task automation and configuration management. This is based on the .NET framework and it includes a command-line shell and a scripting language. Windows PowerShell is designed especially for system administrators. If you are a windows administrator and if you know PowerShell very well and you can simplify and automate tedious and repetitive tasks by creating scripts and combining multiple commands together. This article shows how to start or stop windows services using PowerShell. First,

open PowerShell in elevated mode. In windows 10 you can press Windows + X and select Windows PowerShell admin.

Now you have to get the service name before proceeding to start or stop. How to get all the Windows services using PowerShell.

Type Get-Service in the PowerShell window this will List out all the services.

Example: Get-Service

Get Services-windows services using Powershell

This command will list out all the running and stopped services together. You can get the service names in the List. To separate the stopped and running service you can type the below-mentioned command.

Get-Service | Where {$_.status –eq ‘running’} –>this command will show all the running services

Running Services-windows services using Powershell

Get-Service | Where {$_.status –eq ‘Stopped’} –>this command will show all the Stopped services

Stopped Services-windows services using Powershell

Now you can choose the service name to start or stop. To start a windows service type,

Start-Service “Service name”

Example: Start-Service Spooler

To stop a windows service type Stop-Service “Service name”

Example: Stop-Service Spooler

If you want to know any windows services details you can type the below-mentioned command.

Get-Service “Service name” | Select-object * Example: Get-Service Spooler | select-Object *

Get Services Details-windows services using Powershell

This command will get the service named printer spooler and it shows all the object details. * indicates all the objects. If you want to show any individual Object you can type the object name instead of *.

Example: Get-Service Spooler | select-Object DisplayName

Get Services Details-windows services using Powershell

I think this might be helpful. 

Read Also:

How to remove Windows Service in Windows 11?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top