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
21 changes: 11 additions & 10 deletions reference/5.1/Microsoft.PowerShell.Management/Set-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/set-service?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-Service
Expand Down Expand Up @@ -168,6 +168,7 @@ Name StartType
spooler Automatic
SQLWriter Automatic
```

## PARAMETERS

### -ComputerName
Expand Down Expand Up @@ -291,18 +292,18 @@ Accept wildcard characters: False

Sets the startup type of the service. The acceptable values for this parameter are:

- **Automatic** - The service is started or was started by the operating system, at system start-up.
- `Automatic` - The service is started or was started by the operating system, at system start-up.
If an automatically started service depends on a manually started service, the manually started
service is also started automatically at system startup.
- **Disabled** - The service is disabled and cannot be started by a user or application.
- **Manual** - The service is started only manually, by a user, using the Service Control Manager,
- `Disabled` - The service is disabled and cannot be started by a user or application.
- `Manual` - The service is started only manually, by a user, using the Service Control Manager,
or by an application.
- **Boot** - Indicates that the service is a device driver started by the system loader. This
- `Boot` - Indicates that the service is a device driver started by the system loader. This
value is valid only for device drivers.
- **System** - Indicates that the service is a device driver started by the 'IOInitSystem()'
- `System` - Indicates that the service is a device driver started by the 'IOInitSystem()'
function. This value is valid only for device drivers.

The default value is **Automatic**.
The default value is `Automatic`.

```yaml
Type: System.ServiceProcess.ServiceStartMode
Expand All @@ -323,9 +324,9 @@ Specifies the status for the service.

The acceptable values for this parameter are as follows:

- **Paused**. Suspends the service.
- **Running**. Starts the service.
- **Stopped**. Stops the service.
- `Paused`. Suspends the service.
- `Running`. Starts the service.
- `Stopped`. Stops the service.

```yaml
Type: System.String
Expand Down
27 changes: 14 additions & 13 deletions reference/7.4/Microsoft.PowerShell.Management/Set-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/set-service?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-Service
Expand Down Expand Up @@ -224,18 +224,19 @@ SQLWriter Automatic

### -Credential

Specifies the account used by the service as the [Service Logon Account](/windows/desktop/ad/about-service-logon-accounts).
Specifies the account used by the service as the
[Service Logon Account](/windows/desktop/ad/about-service-logon-accounts).

Type a user name, such as **User01** or **Domain01\User01**, or enter a **PSCredential** object,
such as one generated by the `Get-Credential` cmdlet. If you type a user name, this cmdlet prompts
you for a password.

Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential)
object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring).
Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) object
and the password is stored as a [SecureString](xref:System.Security.SecureString).

> [!NOTE]
> For more information about **SecureString** data protection, see
> [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring).
> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring).

This parameter was introduced in PowerShell 6.0.

Expand Down Expand Up @@ -390,14 +391,14 @@ Specifies the start mode of the service.

The acceptable values for this parameter are as follows:

- **Automatic** - The service is started or was started by the operating system, at system start-up.
- `Automatic` - The service is started or was started by the operating system, at system start-up.
If an automatically started service depends on a manually started service, the manually started
service is also started automatically at system startup.
- **AutomaticDelayedStart** - Starts shortly after the system boots.
- **Disabled** - The service is disabled and cannot be started by a user or application.
- **InvalidValue** - Has no effect. The cmdlet does not return an error but the StartupType of the
- `AutomaticDelayedStart` - Starts shortly after the system boots.
- `Disabled` - The service is disabled and cannot be started by a user or application.
- `InvalidValue` - Has no effect. The cmdlet does not return an error but the StartupType of the
service is not changed.
- **Manual** - The service is started only manually, by a user, using the Service Control Manager,
- `Manual` - The service is started only manually, by a user, using the Service Control Manager,
or by an application.

```yaml
Expand All @@ -419,9 +420,9 @@ Specifies the status for the service.

The acceptable values for this parameter are as follows:

- **Paused**. Suspends the service.
- **Running**. Starts the service.
- **Stopped**. Stops the service.
- `Paused`. Suspends the service.
- `Running`. Starts the service.
- `Stopped`. Stops the service.

```yaml
Type: System.String
Expand Down
18 changes: 9 additions & 9 deletions reference/7.5/Microsoft.PowerShell.Management/Set-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/set-service?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-Service
Expand Down Expand Up @@ -391,14 +391,14 @@ Specifies the start mode of the service.

The acceptable values for this parameter are as follows:

- **Automatic** - The service is started or was started by the operating system, at system start-up.
- `Automatic` - The service is started or was started by the operating system, at system start-up.
If an automatically started service depends on a manually started service, the manually started
service is also started automatically at system startup.
- **AutomaticDelayedStart** - Starts shortly after the system boots.
- **Disabled** - The service is disabled and cannot be started by a user or application.
- **InvalidValue** - Has no effect. The cmdlet does not return an error but the StartupType of the
- `AutomaticDelayedStart` - Starts shortly after the system boots.
- `Disabled` - The service is disabled and cannot be started by a user or application.
- `InvalidValue` - Has no effect. The cmdlet does not return an error but the StartupType of the
service is not changed.
- **Manual** - The service is started only manually, by a user, using the Service Control Manager,
- `Manual` - The service is started only manually, by a user, using the Service Control Manager,
or by an application.

```yaml
Expand All @@ -420,9 +420,9 @@ Specifies the status for the service.

The acceptable values for this parameter are as follows:

- **Paused**. Suspends the service.
- **Running**. Starts the service.
- **Stopped**. Stops the service.
- `Paused`. Suspends the service.
- `Running`. Starts the service.
- `Stopped`. Stops the service.

```yaml
Type: System.String
Expand Down
27 changes: 14 additions & 13 deletions reference/7.6/Microsoft.PowerShell.Management/Set-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/set-service?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Set-Service
Expand Down Expand Up @@ -224,18 +224,19 @@ SQLWriter Automatic

### -Credential

Specifies the account used by the service as the [Service Logon Account](/windows/desktop/ad/about-service-logon-accounts).
Specifies the account used by the service as the
[Service Logon Account](/windows/desktop/ad/about-service-logon-accounts).

Type a user name, such as **User01** or **Domain01\User01**, or enter a **PSCredential** object,
such as one generated by the `Get-Credential` cmdlet. If you type a user name, this cmdlet prompts
you for a password.

Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential)
object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring).
Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) object
and the password is stored as a [SecureString](xref:System.Security.SecureString).

> [!NOTE]
> For more information about **SecureString** data protection, see
> [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring).
> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring).

This parameter was introduced in PowerShell 6.0.

Expand Down Expand Up @@ -390,14 +391,14 @@ Specifies the start mode of the service.

The acceptable values for this parameter are as follows:

- **Automatic** - The service is started or was started by the operating system, at system start-up.
- `Automatic` - The service is started or was started by the operating system, at system start-up.
If an automatically started service depends on a manually started service, the manually started
service is also started automatically at system startup.
- **AutomaticDelayedStart** - Starts shortly after the system boots.
- **Disabled** - The service is disabled and cannot be started by a user or application.
- **InvalidValue** - Has no effect. The cmdlet does not return an error but the StartupType of the
- `AutomaticDelayedStart` - Starts shortly after the system boots.
- `Disabled` - The service is disabled and cannot be started by a user or application.
- `InvalidValue` - Has no effect. The cmdlet does not return an error but the StartupType of the
service is not changed.
- **Manual** - The service is started only manually, by a user, using the Service Control Manager,
- `Manual` - The service is started only manually, by a user, using the Service Control Manager,
or by an application.

```yaml
Expand All @@ -419,9 +420,9 @@ Specifies the status for the service.

The acceptable values for this parameter are as follows:

- **Paused**. Suspends the service.
- **Running**. Starts the service.
- **Stopped**. Stops the service.
- `Paused`. Suspends the service.
- `Running`. Starts the service.
- `Stopped`. Stops the service.

```yaml
Type: System.String
Expand Down
3 changes: 2 additions & 1 deletion reference/docs-conceptual/install/install-alpine.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: How to install PowerShell on Alpine Linux
ms.date: 12/15/2025
ms.date: 02/04/2026
title: Install PowerShell on Alpine Linux
---
# Install PowerShell on Alpine Linux
Expand Down Expand Up @@ -28,6 +28,7 @@ to the package depends on the version of PowerShell you want to install.
Then, in the terminal, execute the following shell commands to install PowerShell 7.4:

```sh
#!/bin/bash
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shebang specifies bash, but Alpine Linux does not include bash by default and the script does not use any bash-specific features. Alpine uses ash (Almquist shell) by default. Consider changing this to #!/bin/sh for better compatibility with Alpine's default shell, or document that bash needs to be installed first. The other distribution scripts (Ubuntu, Debian, RHEL) correctly use #!/bin/bash because they use bash-specific features like source and bash parameter expansion.

Suggested change
#!/bin/bash
#!/bin/sh

Copilot uses AI. Check for mistakes.
# install the requirements
sudo apk add --no-cache \
ca-certificates \
Expand Down
4 changes: 3 additions & 1 deletion reference/docs-conceptual/install/install-debian.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: How to install PowerShell on Debian Linux
ms.date: 12/15/2025
ms.date: 02/04/2026
title: Install PowerShell on Debian
---
# Install PowerShell on Debian
Expand Down Expand Up @@ -31,6 +31,7 @@ Installing PowerShell from PMC is the preferred method of installation.
> This script only works for supported versions of Debian.

```sh
#!/bin/bash
###################################
# Prerequisites

Expand Down Expand Up @@ -81,6 +82,7 @@ The following shell script downloads and installs the current release of PowerSh
change the URL to download the version of PowerShell that you want to install.

```sh
#!/bin/bash
###################################
# Prerequisites

Expand Down
3 changes: 2 additions & 1 deletion reference/docs-conceptual/install/install-rhel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Information about installing PowerShell on Red Hat Enterprise Linux (RHEL)
ms.date: 12/15/2025
ms.date: 02/04/2026
title: Installing PowerShell on Red Hat Enterprise Linux (RHEL)
---
# Installing PowerShell on Red Hat Enterprise Linux (RHEL)
Expand Down Expand Up @@ -31,6 +31,7 @@ Installing PowerShell from PMC is the preferred method of installation.
> This script only works for supported versions of RHEL that are published to PMC.

```sh
#!/bin/bash
###################################
# Prerequisites

Expand Down
4 changes: 3 additions & 1 deletion reference/docs-conceptual/install/install-ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Information about installing PowerShell on Ubuntu
ms.date: 12/15/2025
ms.date: 02/04/2026
title: Installing PowerShell on Ubuntu
---
# Installing PowerShell on Ubuntu
Expand Down Expand Up @@ -31,6 +31,7 @@ Installing PowerShell from PMC is the preferred method of installation.
> This script only works for supported versions of Ubuntu.

```sh
#!/bin/bash
###################################
# Prerequisites

Expand Down Expand Up @@ -93,6 +94,7 @@ The following shell script downloads and installs the current preview release of
change the URL to download the version of PowerShell that you want to install.

```sh
#!/bin/bash
###################################
# Prerequisites

Expand Down