Repository navigation
Conversation
👷 Deploy request for powershellorg pending review.Visit the deploys page to approve it
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The missing November archive _index.md causes the required validate:articles CI step to fail.
3 open issues
What changed in this PR
Adds a community troubleshooting article for Windows administrators, implementing the pitch in #428 with a PowerShell function for examining sleep and wake history.
Changes:
- Introduces
Get-SleepWakeHistoryto pair sleep and wake events and report durations, reasons, and wake sources. - Shows how to identify and disable wake permissions for scheduled tasks and devices.
- Documents Modern Standby, battery settings, and hibernation limitations with reported test results.
No concerns identified under the article-specific unsafe-content, AI-content-signal, or self-promotion checks. Final publication remains a maintainer decision.
| File | Description |
|---|---|
| content/articles/2026/11/find-what-wakes-a-windows-pc-with-get-winevent/index.md | Adds the troubleshooting article, PowerShell examples, sample output, and platform caveats. |
Review effort: Balanced
| author: Chris Smith | ||
| authors: | ||
| - Chris Smith | ||
| date: "2026-11-03T00:00:00+00:00" |
Comment on lines
+135
to
+136
| Where-Object { $_.TimeCreated -ge $sleptAt.AddMinutes(-2) -and $_.TimeCreated -le $sleptAt.AddMinutes(1) } | | ||
| Select-Object -Last 1 |
| ComputerName = $ComputerName | ||
| Slept = $sleptAt | ||
| Woke = $wokeAt | ||
| Asleep = New-TimeSpan -Start $sleptAt -End $wokeAt |
The validate:articles step requires an _index.md in every month folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXY6pfEzpyB9Cjasa4B4S9
Pick the event 42 closest to SleepTime so a later sleep's event in the window isn't matched, and compute Asleep from the DateTimeOffset values so a sleep across a daylight saving change has the right length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXY6pfEzpyB9Cjasa4B4S9
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #428
This adds the article pitched in #428. It builds
Get-SleepWakeHistory, which pairs Kernel-Power event 42 with Power-Troubleshooter event 1 to show when a PC slept, why it went to sleep, and what woke it. It then lists the scheduled tasks withWakeToRunset and the devices armed to wake the PC, and shows how to turn off each one.The code was tested in Windows PowerShell 5.1 and PowerShell 7.6 on two Windows 11 PCs (builds 26200 and 26300), a desktop that uses S3 sleep and a Modern Standby laptop. Every output block in the article comes from those runs.