Skip to content

Document Unix platform support for Get/Start/Stop/Restart-Service (PowerShell 7.8) - #13383

Open
soroshsabz wants to merge 9 commits into
MicrosoftDocs:mainfrom
soroshsabz:unix-service-cmdlets-docs
Open

soroshsabz wants to merge 9 commits into
MicrosoftDocs:mainfrom
soroshsabz:unix-service-cmdlets-docs

Conversation

@soroshsabz

@soroshsabz soroshsabz commented Nov 10, 2026 •

Copy link
Copy Markdown

ITNOA

PR Summary

This change updates the conceptual articles to document Unix platform support for the
Get-Service, Start-Service, Stop-Service, and Restart-Service cmdlets. The feature is
implemented in PowerShell/PowerShell#28385, which targets master and will therefore ship in
PowerShell 7.8 - it is not part of the released PowerShell 7.7, so this PR intentionally does
not change the shipped reference/7.7 pages or the What's New in PowerShell 7.7 article.

Changes:

  • PowerShell differences on non-Windows platforms (unix-support.md): moves the four service
    cmdlets from the "cmdlets not available on Linux and macOS" list to the "available with
    limitations" list, annotated as available for Linux and macOS in PowerShell 7.8+.
  • Release history of modules and cmdlets (cmdlet-versions.md): marks the four service cmdlets
    as "Added Linux/macOS support in 7.8", following the existing Restart-Computer /
    Stop-Computer ("Added Linux/macOS support in 7.1") style.
  • Updated ms.date.

Follow-up work once the reference/7.8 folder is created upstream: update the four cmdlet
reference pages (Get-Service, Start-Service, Stop-Service, Restart-Service) to document
the Unix behavior - the service manager discovery order (systemctl, launchctl, service,
rc-service), the UnixServiceController output object, the non-interactive sudo -n
requirements, the launchd domain scope on macOS, and the per-parameter platform behavior.

This documentation change supports the code change in PowerShell/PowerShell#28385, which
implements PowerShell/PowerShell#18863.

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributor's guide.
  • Style: This PR adheres to the style guide.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 11:12
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 37a8789:

✅ Validation status: passed

File Status Preview URL Details
reference/7.7/Microsoft.PowerShell.Management/Get-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Restart-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Start-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md ✅Succeeded View (powershell-7.7)

For more details, please refer to the build report.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation incorrectly names RequiredServices as the dependency property instead of ServicesDependedOn, directing readers to the wrong member on returned service objects.

1 open issue
What changed in this PR

Documents Linux and macOS support for four service cmdlets in PowerShell 7.7, alongside the companion implementation.

Changes:

  • Replaces Windows-only availability notes with Unix service-manager discovery and elevation behavior.
  • Documents Unix output types, parameter differences, and cross-platform aliases.
  • Separates platform-specific guidance and refreshes documentation dates.
File Description
reference/​7.7/​Microsoft.PowerShell.Management/​Stop-Service.md Documents Unix stopping behavior, elevation, and Force/NoWait handling.
reference/​7.7/​Microsoft.PowerShell.Management/​Start-Service.md Adds Unix startup behavior, output type, and platform-specific notes.
reference/​7.7/​Microsoft.PowerShell.Management/​Restart-Service.md Adds Unix restart behavior, elevation requirements, and an example.
reference/​7.7/​Microsoft.PowerShell.Management/​Get-Service.md Documents Unix discovery, dependency support, output properties, and naming behavior.

Review effort: Balanced

displays the name of the service, the name of the dependent services, and a calculated property that
displays the number of dependent services for each service.

On Unix platforms, the **DependentServices** and **RequiredServices** properties are only populated
- DependentServices/RequiredServices return no results on non-systemd
  managers (no error is written).
- Stop-Service -NoWait skips the wait; no manager-specific flag is used.
- Restart-Service uses the shared stop/start implementation on every
  manager; describe the per-manager stop and start commands.
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit ee3f1d9:

✅ Validation status: passed

File Status Preview URL Details
reference/7.7/Microsoft.PowerShell.Management/Get-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Restart-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Start-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md ✅Succeeded View (powershell-7.7)

For more details, please refer to the build report.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two documentation references incorrectly name the dependency property as RequiredServices instead of ServicesDependedOn, directing readers to inspect the wrong member.

2 open issues

Review effort: Balanced

Get-Service "WinRM" -RequiredServices
```

On Unix platforms, the **RequiredServices** property is only populated when the system service
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5d70f4a:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: CannotMergeCommit] Cannot merge commit 5d70f4af594cd72e1479a211b7c5db135d60171a in branch unix-service-cmdlets-docs of repository https://github.com/soroshsabz/PowerShell-Docs into branch main (commit ebaa235784a688ec72ab642186c4c17460fb438b). Please follow this documentation: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ to use git.exe to resolve you content conflicts locally and then push to remote.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

- sudo -n is non-interactive: explain the cached credential timestamp
  and NOPASSWD requirements and the guidance for non-interactive
  scripts and CI pipelines.
- Document the launchd domain scope on macOS (system daemons for root,
  gui/<uid> agents for non-root sessions).
- Add explicit notes that Set/New/Remove/Suspend/Resume-Service remain
  Windows-only.
@soroshsabz
soroshsabz force-pushed the unix-service-cmdlets-docs branch from 5d70f4a to cba6695 Compare November 18, 2026 21:25
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

You are not allowed to delete the mandatory files in this repo.

Total execution time: 5.07 seconds

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit cba6695:

✅ Validation status: passed

File Status Preview URL Details
reference/7.7/Microsoft.PowerShell.Management/Get-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Restart-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Start-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md ✅Succeeded View (powershell-7.7)

For more details, please refer to the build report.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new Get-Service notes incorrectly name the dependency output property RequiredServices instead of ServicesDependedOn, creating inconsistencies with the examples and parameter documentation.

2 open issues

Review effort: Balanced

@soroshsabz soroshsabz changed the title Document Unix platform support for Get/Start/Stop/Restart-Service (PowerShell 7.7) Document Unix platform support for Get/Start/Stop/Restart-Service Nov 20, 2026
PowerShell 7.7 is now released (GA 2026-11-10); align the conceptual
docs with the Unix service cmdlet support:

- What's New in PowerShell 7.7: announce the Unix service cmdlets,
  update the intro from the preview wording to the GA release, and
  bump ms.date.
- unix-support.md: move Get/Start/Stop/Restart-Service out of the
  not-available list into the available-with-limitations list (7.7+)
  and update the intro paragraph; bump ms.date.
- cmdlet-versions.md: mark the four service cmdlets as 'Added
  Linux/macOS support in 7.7' following the Restart-Computer style;
  bump ms.date.
- Using-Format-Commands sample: update the Get-Service Windows-only
  callout; bump ms.date.
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 9f686c3:

✅ Validation status: passed

File Status Preview URL Details
reference/7.7/Microsoft.PowerShell.Management/Get-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Restart-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Start-Service.md ✅Succeeded View (powershell-7.7)
reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md ✅Succeeded View (powershell-7.7)
reference/docs-conceptual/samples/Using-Format-Commands-to-Change-Output-View.md ✅Succeeded View (>=powershell-5.1)
reference/docs-conceptual/whats-new/cmdlet-versions.md ✅Succeeded View (>=powershell-5.1)
reference/docs-conceptual/whats-new/unix-support.md ✅Succeeded View (>=powershell-5.1)
reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-77.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

PowerShell 7.7 released on 2026-11-10 does not include the Unix
service cmdlets (PowerShell/PowerShell#28385 is not merged into the
7.7 release), so the shipped 7.7 reference pages stay as they are and
the What's New 7.7 article is unchanged. The feature targets 7.8:

- Revert the reference/7.7 changes and the What's New 7.7 and
  Using-Format-Commands changes.
- unix-support.md: annotate the four service cmdlets as available for
  Linux and macOS in PowerShell 7.8+.
- cmdlet-versions.md: 'Added Linux/macOS support in 7.8'.

The reference/7.8 cmdlet pages will be updated once the 7.8 version
folder is created upstream.
@soroshsabz soroshsabz changed the title Document Unix platform support for Get/Start/Stop/Restart-Service Document Unix platform support for Get/Start/Stop/Restart-Service (PowerShell 7.8) Nov 20, 2026
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit f2fedf4:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/whats-new/cmdlet-versions.md ✅Succeeded View (>=powershell-5.1)
reference/docs-conceptual/whats-new/unix-support.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Unix platform support for Get/Start/Stop/Restart-Service

2 participants