You are currently viewing PowerShell Get-Service Cmdlet

PowerShell Get-Service Cmdlet

PowerShell Get-Service Cmdlet

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed Resolve-Path cmdlet in PowerShell.

https://cloudaffaire.com/powershell-resolve-path-cmdlet/

In this blog post, we will discuss Get-Service cmdlet in PowerShell. You can use Get-Service cmdlet to get windows service status. Get-Service cmdlet returns the service status whether its running or stopped along with other details like service name, service display name, dependent service, etc. You can use Get-Member cmdlet to get all the list of items that you can get using Get-Service cmdlet. You need to permission to view windows service status to use Get-Service cmdlet. Get-Service cmdlet can also be used to get the service status of a remote computer using ‘ComputerName’ parameter.

Get-Service Cmdlet Syntax:

Get-Service Cmdlet Argument List:

  • ComputerName: Gets the services running on the specified computers. The default is the local computer.
  • DependentServices: Indicates that this cmdlet gets only the services that depend upon the specified service.
  • DisplayName: Specifies, as a string array, the display names of services to be retrieved. Wildcards are permitted.
  • Exclude: Specifies, as a string array, a service or services that this cmdlet excludes from the operation.
  • Include: Specifies, as a string array, a service or services that this cmdlet includes in the operation.
  • InputObject: Specifies ServiceController objects representing the services to be retrieved.
  • Name: Specifies the service names of services to be retrieved. Wildcards are permitted.
  • RequiredServices: Indicates that this cmdlet gets only the services that this service requires.

PowerShell Get-Service Cmdlet:

Get All The Columns And Functions Available To Get-Service Cmdlet:

Get All Windows Service Status In PowerShell:

Get A Specific Windows Service Status In PowerShell:

Get The Complete Details For A Windows Service In PowerShell:

Get A Specific Windows Service Status By Its Display Name In PowerShell:

Get All The Dependent Services For A Windows Service In PowerShell:

Get All The Required Services For A Windows Service In PowerShell:

Get Windows Service Status For Remote Computers In PowerShell:

Get Windows Service Status By Wildcard Entry In PowerShell:

Get All The Running Windows Services In PowerShell:

Get All The Stopped Windows Services In PowerShell:

Get The Start-up Mode For A Windows Service In PowerShell:

Hope you have enjoyed this article. In the next blog post, we will discuss Set-Service cmdlet in PowerShell.

To Set more details on PowerShell, kindly follow below official documentation

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about?view=powershell-5.1

 

Leave a Reply