Find out which devices are armed to wake up your pc:
powercfg -devicequery wake_armed
(source)
Get information on last wake like the time or reason for wake up.
cmd /k wevtutil qe System /q:"*[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter']]]" /rd:true /c:1 /f:text
cmd /k
- This opens a command session, executes the command that follows, and keeps the window open. Useful if you’re entering commands in a Run dialog; unnecessary if you already have an active command prompt.
wevtutil
- Windows event log read utility.
qe
- Query events …
System
- … specifically from the system event logs.
/q:"..."
- XPath-like query used to traverse the XML.
/rd:true
- Direction, “true” shows latest first.
/c:1
- Number of results to return.
/f:text
- Format output as text, which is fairly readable in this case. Could also opt for “XML”.
This simply returns the last event with a source name of ‘Microsoft-Windows-Power-Troubleshooter’. Skim through the result to verify that it’s a return from sleep event. If not, increase the number of results to return using the /c parameter.
This can also be accessed via the GUI using
Start -> Run -> eventvwr -> Windows Logs -> System -> Find -> “Microsoft-Windows-Power-Troubleshooter”
.
(source)