To disable all devices from waking your computer using a PowerShell command on a Windows computer
To disable all devices from waking your computer using a PowerShell command on a Windows computer 1, you can use the powercfg command with the /devicedisablewake option. Here's how:
Open PowerShell as an administrator.
Type the command
powercfg /devicequery wake_armedand press Enter to get a list of devices that can wake up your computer.For each device listed, type the command
powercfg /devicedisablewake "[device name]"and press Enter, replacing "[device name]" with the actual name of the device. This will disable the device from waking up your computer.
If you want to disable all devices at once, you can use the ForEach statement in PowerShell to loop through all devices and disable wake-up for each one. Here's an example:
Comments
Post a Comment