Document Unix platform support for Get/Start/Stop/Restart-Service
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- powershell
調査の方向性
reference/7.7/Microsoft.PowerShell.Management にある、指定された4つのコマンドレット記事、Get-Service.md、Start-Service.md、Stop-Service.md、Restart-Service.md を更新します。まず、各記事の DESCRIPTION、PARAMETERS、OUTPUTS、NOTES セクションを、この issue で提案されている内容とあわせて読みます。記事で Unix サービスマネージャーの検出、UnixServiceController の出力、sudo の要件、プラットフォーム固有のパラメーター動作を説明し、Windows でのみ利用可能である旨の記述を削除したら完了です。
索引モデルが issue の本文から書いたものです。
説明
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foocmdlet" instead of "New cmdlet."
Summary
PowerShell is adding Unix platform support for the Get-Service, Start-Service, Stop-Service, and Restart-Service cmdlets in PowerShell 7.7. The cmdlet references currently document these cmdlets as Windows-only; they need to describe the new Unix behavior, the returned UnixServiceController object, and the sudo requirements for service management.
Details
The change was proposed in PowerShell/PowerShell#18863 and is implemented in PowerShell/PowerShell#28385: on Linux and macOS, the four service cmdlets work through the system service manager, which is discovered in this order: systemctl (systemd), launchctl (macOS), service (sysvinit), and rc-service (OpenRC).
On Unix platforms:
- The cmdlets return UnixServiceController objects instead of System.ServiceProcess.ServiceController objects. The Status and StartType properties map the service manager state onto the same enumerations that are used on Windows.
- Getting service information doesn't require elevated permissions. The service management cmdlets require root privileges; when they aren't running as root, they wrap the service manager command with
sudo -nand write a non-terminating error when elevation isn't available. - The DependentServices and RequiredServices parameters are only populated by systemd.
- The Force parameter is accepted for script compatibility but has no effect on Unix.
- The remaining service cmdlets (
Set-Service,New-Service,Remove-Service,Suspend-Service, andResume-Service) stay Windows-only.
Articles
- Get-Service (
reference/7.7/Microsoft.PowerShell.Management/Get-Service.md) - Start-Service (
reference/7.7/Microsoft.PowerShell.Management/Start-Service.md) - Stop-Service (
reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md) - Restart-Service (
reference/7.7/Microsoft.PowerShell.Management/Restart-Service.md)
Suggested updates:
- Remove the "This cmdlet is only available on the Windows platform." callouts and the Windows-only availability notes.
- Document the Unix service manager discovery order, the UnixServiceController output object, the sudo requirements, and the per-parameter platform behavior in the DESCRIPTION, PARAMETERS, OUTPUTS, and NOTES sections.
Suggested content
Unix support note for each cmdlet's DESCRIPTION section:
Beginning in PowerShell 7.7, this cmdlet is also available on Linux and macOS. On Unix platforms the cmdlet works through the system service manager, which it discovers in this order:
systemctl(systemd),launchctl(macOS),service(sysvinit), andrc-service(OpenRC). For more information, see the Notes section.
Unix output object section:
Microsoft.PowerShell.Commands.UnixServiceController
On Unix platforms, this cmdlet returns UnixServiceController objects that represent the services reported by the system service manager.
Related Source Pull Requests
Related Source Issues
- 主要言語
- PowerShell
- スター
- 2.6k
- フォーク
- 1.7k
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MicrosoftDocs/PowerShell-Docs のほかの issue
-
issue-doc-bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MicrosoftDocs/PowerShell-Docs#13391 ·
メンテナーはふだん 1 日以内に返信
-
Generalize the warning about combining number literals with decimal places with integer-type suffixes対応中かも @Tegrask が 2 日前に担当しました。 オープンneeds-triage
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
MicrosoftDocs/PowerShell-Docs#13384 ·
メンテナーはふだん 1 日以内に返信
-
Document the renamed `-BasePath` parameter (formerly `-RelativeBasePath`) of Resolve-Path対応中かも @soroshsabz が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
MicrosoftDocs/PowerShell-Docs#13379 ·
メンテナーはふだん 1 日以内に返信
-
https://github.com/MicrosoftDocs/PowerShell-Docs/issues?q=state%3Aopen%20label%3A%22needs-triage%22オープンneeds-triage
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
MicrosoftDocs/PowerShell-Docs#13377 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MicrosoftDocs/PowerShell-Docs#13375 ·
メンテナーはふだん 1 日以内に返信
MicrosoftDocs/PowerShell-Docs の issue をすべて見る
似ている issue
-
area:agent-sdk area:docs documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
anthropics/claude-code#110914 ·
-
specification
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
WICG/webmonetization#813 ·
メンテナーはふだん 3 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Polish READMEオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Doc: Remove quotes and backticks around RFC objects対応中かも @Tirth00000 が今日担当しました。 オープンdoc good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
collective/icalendar#2146 · コメント 1 件 ·