How does Win10 use commands to view software that wakes up system devices and tasks?

  

For energy saving reasons, computers generally turn on power management, which causes the device to go to sleep after a period of inactivity, or to allow certain devices to enter. Standby, such as monitors and hard drives. Broadly speaking, booting itself is also a wake-up device, but it is more practical to rest before the device wakes up. In order to wake up the computer and device from the rest, you may need to manually operate the mouse, keyboard, or press the power button, etc., or the start of a task will let the computer sleep. Due to the setup problem, each computer wakes up differently, and the wakeup device also has a difference. For your computer, which devices can wake up the system? How can I make the computer in sleep state not be awakened by some tasks? Using the commands described in this article, you can easily understand who these devices and tasks are, for Win7/Win8.1/Win10 systems.

Command 1: Check the list of devices that can wake up the system

Open a command prompt and execute the following command to list the devices that can wake up the system (as shown below):

powercfg -devicequery wake_armed

Command 2: View the device that last waking up the system

Still in the command prompt, execute the following command to view the last wakeup (including boot The system's devices (pictured above):

powercfg -lastwake

After figuring out which device can wake up the system, you can go to the Control Panel's Device Manager to configure the wakeable device. Can cancel the wake-up function of the corresponding device, as shown below:

Command 3: View the task list that can wake up the device in sleep (Windows 7 is not applicable)

This command uses Powershell After opening, execute the following command (as shown below):

Get-ScheduledTask |  Where {$_.settings.waketorun}

For the above tasks, you can find the corresponding project in the computer management → task scheduler, and then cancel the wake-up permission of the corresponding program.

Copyright © Windows knowledge All Rights Reserved