Title: Add `-Delay`, `-Reason` to Stop-Computer · Issue #28163 · PowerShell/PowerShell · GitHub
Open Graph Title: Add `-Delay`, `-Reason` to Stop-Computer · Issue #28163 · PowerShell/PowerShell
X Title: Add `-Delay`, `-Reason` to Stop-Computer · Issue #28163 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement Currently, the Stop-Computer cmdlet lacks native parameters for delayed shutdowns (-Timeout / -Delay) and audit-compliant shutdown reasons (-Reason / -Comment). System administrators who need to s...
Open Graph Description: Summary of the new feature / enhancement Currently, the Stop-Computer cmdlet lacks native parameters for delayed shutdowns (-Timeout / -Delay) and audit-compliant shutdown reasons (-Reason / -Comme...
X Description: Summary of the new feature / enhancement Currently, the Stop-Computer cmdlet lacks native parameters for delayed shutdowns (-Timeout / -Delay) and audit-compliant shutdown reasons (-Reason / -Comme...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/28163
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add `-Delay`, `-Reason` to Stop-Computer","articleBody":"### Summary of the new feature / enhancement\n\nCurrently, the `Stop-Computer` cmdlet lacks native parameters for delayed shutdowns (`-Timeout` / `-Delay`) and audit-compliant shutdown reasons (`-Reason` / `-Comment`). System administrators who need to schedule maintenance with user grace periods or log structured reasons to the Windows Event Log (Event ID 1074) are forced to abandon idiomatic PowerShell and fall back to the legacy `shutdown.exe` command-line utility.\n\nAs a systems administrator managing Windows environments via PowerShell,\n\nI want to specify a delay countdown, an audit reason, and a custom comment directly within the Stop-Computer cmdlet,\n\nSo that I can give active users advance notice before power-off and maintain accurate system event audit logs without relying on legacy shutdown.exe workarounds.\n\n### Proposed technical implementation details (optional)\n\n* **`-Timeout` / `-Delay`** `[int]`: Time to wait (in seconds) before initiating the shutdown/restart.\n* **`-Comment`** `[string]`: User-readable message or banner text displayed to users and recorded in the event log.\n* **`-Reason`** `[string]` *(or enum)*: Standardized Windows shutdown reason code (e.g., `PlannedMaintenance`, `UnplannedHardwareIssue`, `PlannedOperatingSystemReconfig`) mapped to standard Windows Major:Minor reason codes.","author":{"url":"https://github.com/soroshsabz","@type":"Person","name":"soroshsabz"},"datePublished":"2026-10-07T20:50:03Z","url":"https://github.com/PowerShell/PowerShell/issues/28163"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fd4b27d-d752-7488-fb47-0b2dfea5c5d5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5EA:274D5F:751370:A92EAD:6AFD80E5 |
| html-safe-nonce | 22ecd729b1c47412dcee472e310df19c4edbf46caa142bb5bff74a6b9349c2bb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUVBOjI3NEQ1Rjo3NTEzNzA6QTkyRUFEOjZBRkQ4MEU1IiwidmlzaXRvcl9pZCI6IjgwMjM5NTA3ODcxNDQ5NDE3OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a6beed426a1d303ac9411c61fc441dc9cce1ec5b0d460d15f60e22d6ae10ebeb |
| hovercard-subject-tag | issue:5751677700 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/28163/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4484d79e27d2a98399ffa92eba3e58cce41b84f983852c8094a57cbf77b7a3b0/PowerShell/PowerShell/issues/28163 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4484d79e27d2a98399ffa92eba3e58cce41b84f983852c8094a57cbf77b7a3b0/PowerShell/PowerShell/issues/28163 |
| og:image:alt | Summary of the new feature / enhancement Currently, the Stop-Computer cmdlet lacks native parameters for delayed shutdowns (-Timeout / -Delay) and audit-compliant shutdown reasons (-Reason / -Comme... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | soroshsabz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42d4967e3c8afca51ccac31f419a705af777226a95f025ea73387d87a306b326 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2329ceed0bc2c7b7c3b9f5f2db6abfc7b6fc3a50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width