<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Get-Winevent on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/tags/get-winevent/</link><description>Recent content in Get-Winevent on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 03 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://powershell.org/tags/get-winevent/index.xml" rel="self" type="application/rss+xml"/><item><title>Find What Wakes a Windows PC With Get-WinEvent</title><link>https://powershell.org/articles/2026/11/find-what-wakes-a-windows-pc-with-get-winevent/</link><pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><guid>https://powershell.org/articles/2026/11/find-what-wakes-a-windows-pc-with-get-winevent/</guid><description>&lt;p&gt;A PC that turns itself on at night leaves a record in the System log every time it does. Windows writes one event when the PC goes to sleep and another when it wakes up. The wake event names the device or timer that woke it.&lt;/p&gt;
&lt;p&gt;This article builds &lt;code&gt;Get-SleepWakeHistory&lt;/code&gt;, a function that reads those two events with &lt;code&gt;Get-WinEvent&lt;/code&gt;, pairs each sleep with its corresponding wake, and returns one row per sleep with how long the PC slept, why it went to sleep, and what woke it. It then lists the two things Windows allows to wake a PC on its own, scheduled tasks with &amp;ldquo;Wake the computer to run this task&amp;rdquo; turned on and devices that are armed to wake it.&lt;/p&gt;</description></item></channel></rss>