- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chirag Nagrekar has Published 465 Articles
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
2K+ Views
To stop the service which has dependent service in PowerShell -Force parameter is used. First, we will check what are the dependent services for specific service, to get them -DependentService parameter is used.ExampleFor example, WMI service (Name: Winmgmt) has multiple dependent services.Get-Service -Name Winmgmt -DependentServicesOutputtatus Name ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
3K+ Views
To start a specific windows service, you need to use Start-Service command.ExampleStart-Service -Name SpoolerAbove command, will start the service name spooler. To check if service is started, use Get-Service –Name Spooler command.OutputStatus Name DisplayName ------ ---- ----------- Running spooler Print SpoolerThis command will not show the command progress. To check ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
503 Views
Similar to -Name parameter, when you add -DisplayName parameter followed by service display name, it will stop service with DisplayName.Stop-Service -DisplayName 'Print Spooler' -VerboseORGet-Service -DisplayName "Print Spooler" | Stop-Service -Verbose
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
19K+ Views
To stop specific service using PowerShell, you need to use Stop-Service command.SyntaxStop-Service -Name ServiceName Stop-Service -DisplayName ServiceDisplayNameExampleStop-Service -Name Spooler To check if service is stopped, type Get-Service -Name Spooler.OutputStatus Name DisplayName ------ ---- ----------- Stopped Spooler ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
2K+ Views
You can also use the WMI method to get the services information instead of standard command Get-Service.CommandTo get the service information on the server, you need to use WMI class Win32_Service.Get-WmiObject -Class Win32_ServiceOutputExitCode : 0 Name : Browser ProcessId : 0 StartMode : Manual State : Stopped Status : ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
12K+ Views
To get service on the remote computer(s), simply you need to add parameter – ComputerName and provide remote servers computer name or IP address.In the below example, we are getting services information on remote computer Win7 which has Automatic start-type.Get-Service -ComputerName Win7 | Where{$_.StartType -eq "Automatic"}Similarly, you can connect multiple ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
485 Views
To filter out services with both start-type “Automatic” and Status “stopped” we need to use the -AND comparison operator. Here, services will be displayed only when both conditions are matching.CommandGet-Service | where{($_.StartType -eq "Automatic") -and ($_.Status -eq "Stopped")} | Select Name, StartType, StatusOutputName StartType Status ---- ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
Chirag Nagrekar
1K+ Views
Below commands will filter out services based on their Status (Running, Stopped).CommandTo get all the running services on the local computer.Get-Service | where{$_.Status -eq "Running"}OutputRunning TimeBrokerSvc Time Broker Running TokenBroker Web Account Manager Running TrkWks Distributed Link Tracking Client ... Read More