Wednesday, April 22, 2015

#57 : Find running Services with Powershell

Find the List of Running Services:
You can get list of all Processes with command like Get-Service. This CmdLet gives you list of all services which are running and stopped.
But sometimes, you might need to know a list of Service which is currently running.
Below Statements can be used for the same -





#--Get the Names of Running Services --#  
Get-Service | where { $_.Status -eq "Running" } | format-table Name  




Stopping a Service with Powershell :

 


Stopping a service is fairly simple with Stop-Service command. Let's do it with a service named "Spooler".




#--Get the Names of Running Services --#  
Stop-Service "Spooler"  









No comments:

Post a Comment

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...