Repository navigation
Document Unix platform support for Get/Start/Stop/Restart-Service (PowerShell 7.8) - #13383
soroshsabz wants to merge 9 commits into
Conversation
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 37a8789: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
🟡 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.
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit ee3f1d9: ✅ Validation status: passed
For more details, please refer to the build report. |
| Get-Service "WinRM" -RequiredServices | ||
| ``` | ||
|
|
||
| On Unix platforms, the **RequiredServices** property is only populated when the system service |
|
Learn Build status updates of commit 5d70f4a: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
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.
5d70f4a to
cba6695
Compare
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit cba6695: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
🔵 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
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.
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 9f686c3: ✅ Validation status: passed
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.
PoliCheck Scan ReportThe 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 foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit f2fedf4: ✅ Validation status: passed
For more details, please refer to the build report. |

ITNOA
PR Summary
This change updates the conceptual articles to document Unix platform support for the
Get-Service,Start-Service,Stop-Service, andRestart-Servicecmdlets. The feature isimplemented in PowerShell/PowerShell#28385, which targets
masterand will therefore ship inPowerShell 7.8 - it is not part of the released PowerShell 7.7, so this PR intentionally does
not change the shipped
reference/7.7pages or the What's New in PowerShell 7.7 article.Changes:
unix-support.md): moves the four servicecmdlets 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+.
cmdlet-versions.md): marks the four service cmdletsas "Added Linux/macOS support in 7.8", following the existing
Restart-Computer/Stop-Computer("Added Linux/macOS support in 7.1") style.ms.date.Follow-up work once the
reference/7.8folder is created upstream: update the four cmdletreference pages (
Get-Service,Start-Service,Stop-Service,Restart-Service) to documentthe Unix behavior - the service manager discovery order (
systemctl,launchctl,service,rc-service), the UnixServiceController output object, the non-interactivesudo -nrequirements, 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