Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions reference/7.4/Microsoft.PowerShell.Management/Get-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 03/20/2024
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -108,10 +108,10 @@ Status is only one property of service objects. To see all of the properties, ty
This example gets services that have dependent services.

```powershell
Get-Service |
Where-Object {$_.DependentServices} |
Get-Service | Where-Object {$_.DependentServices} |
Format-List -Property Name, DependentServices, @{
Label="NoOfDependentServices"; Expression={$_.DependentServices.Count}
Label = "NoOfDependentServices"
Expression = {$_.DependentServices.Count}
}
```

Expand Down Expand Up @@ -140,7 +140,7 @@ This example shows that when you sort services in ascending order by the value o
property, stopped services appear before running services. This happens because the value of
**Status** is an enumeration, in which `Stopped` has a value of `1`, and `Running` has a value of
`4`. For more information, see
[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
[ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus).

To list running services first, use the **Descending** parameter of the `Sort-Object` cmdlet.

Expand Down Expand Up @@ -338,9 +338,16 @@ PowerShell includes the following aliases for `Get-Service`:

This cmdlet is only available on Windows platforms.

Beginning in PowerShell 6.0, the following properties are added to the **ServiceController**
objects: **UserName**, **Description**, **DelayedAutoStart**, **BinaryPathName**, and
**StartupType** .
PowerShell 6.0 introduced the following changes:

- The **ServiceController** objects now include the following properties:
- **UserName**
- **Description**
- **DelayedAutoStart**
- **BinaryPathName**
- **StartupType**
- The command no longer includes the **ComputerName** parameter. To use this command on a remote computer,
use the `Invoke-Command` to target a remote system.

This cmdlet can display services only when the current user has permission to see them. If this
cmdlet does not display services, you might not have permission to see them.
Expand All @@ -363,10 +370,12 @@ services. The **Status** property of a service is an enumerated value in which t
statuses represent integer values. The sort is based on the integer value, not the name. `Running`
appears before `Stopped` because `Stopped` has a value of `1`, and `Running` has a value of `4`. For
more information, see
[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
[ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus).

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[New-Service](New-Service.md)

[Restart-Service](Restart-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 12/12/2022
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/new-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: New-Service
Expand Down Expand Up @@ -318,8 +318,13 @@ This cmdlet is only available on Windows platforms.

To run this cmdlet, start PowerShell by using the **Run as administrator** option.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[Restart-Service](Restart-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 12/12/2022
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/remove-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Remove-Service
Expand Down Expand Up @@ -152,8 +152,13 @@ This cmdlet is only available on Windows platforms.

To run this cmdlet, start PowerShell by using the **Run as administrator** option.

Like the other `*-Service` cmdlets, this command doesn't have a **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[Restart-Service](Restart-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 09/03/2024
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/restart-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Restart-Service
Expand Down Expand Up @@ -269,8 +269,13 @@ This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the
**DisplayName** column.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 12/12/2022
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/resume-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Resume-Service
Expand Down Expand Up @@ -247,8 +247,13 @@ This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the
**DisplayName** column.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,13 @@ a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the
**Name** column and the display names are in the **DisplayName** column.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
15 changes: 11 additions & 4 deletions reference/7.4/Microsoft.PowerShell.Management/Start-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 10/15/2024
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/start-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -92,9 +92,10 @@ existing file.

This example shows how to start a service when the start type of the service is **Disabled**.

```
```powershell
PS> Start-Service tlntsvr
Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannot start service TlntSvr on computer '.'.
Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannot
start service TlntSvr on computer '.'.
At line:1 char:14
+ Start-Service <<<< tlntsvr

Expand Down Expand Up @@ -256,7 +257,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down Expand Up @@ -303,8 +305,13 @@ This cmdlet is only available on Windows platforms.
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the
following message: `Service \<display-name\> start failed.`

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
13 changes: 9 additions & 4 deletions reference/7.4/Microsoft.PowerShell.Management/Stop-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 01/27/2023
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/stop-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -51,15 +51,15 @@ to stop.

### Example 1: Stop a service on the local computer

```
```powershell
PS C:\> Stop-Service -Name "sysmonlog"
```

This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer.

### Example 2: Stop a service by using the display name

```
```powershell
PS C:\> Get-Service -DisplayName "telnet" | Stop-Service
```

Expand All @@ -69,7 +69,7 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes

### Example 3: Stop a service that has dependent services

```
```powershell
PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices
PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm
```
Expand Down Expand Up @@ -297,8 +297,13 @@ To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName**
column.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 12/12/2022
ms.date: 02/04/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/suspend-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Suspend-Service
Expand Down Expand Up @@ -50,25 +50,25 @@ object that represents the services that you want to suspend.

### Example 1: Suspend a service

```
PS C:\> Suspend-Service -DisplayName "Telnet"
```powershell
Suspend-Service -DisplayName "Telnet"
```

This command suspends the Telnet service (Tlntsvr) service on the local computer.

### Example 2: Display what would happen if you suspend services

```
PS C:\> Suspend-Service -Name lanman* -WhatIf
```powershell
Suspend-Service -Name lanman* -WhatIf
```

This command tells what would happen if you suspended the services that have a service name that
starts with lanman. To suspend the services, rerun the command without the **WhatIf** parameter.

### Example 3: Get and suspend a service

```
PS C:\> Get-Service schedule | Suspend-Service
```powershell
Get-Service schedule | Suspend-Service
```

This command uses the `Get-Service` cmdlet to get an object that represents the Task Scheduler
Expand All @@ -77,8 +77,10 @@ This command uses the `Get-Service` cmdlet to get an object that represents the

### Example 4: Suspend all services that can be suspended

```
PS C:\> Get-Service | Where-Object {$_.CanPauseAndContinue -eq "True"} | Suspend-Service -Confirm
```powershell
Get-Service |
Where-Object {$_.CanPauseAndContinue -eq "True"} |
Suspend-Service -Confirm
```

This command suspends all of the services on the computer that can be suspended. It uses
Expand Down Expand Up @@ -270,8 +272,13 @@ This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the
**DisplayName** column.

Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use
this command on a remote computer, use the `Invoke-Command` to target a remote system.

## RELATED LINKS

[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)

[Get-Service](Get-Service.md)

[New-Service](New-Service.md)
Expand Down
Loading