Change When I close the Lid option using Powercfg Command

How to Change When I close the Lid option using Powercfg Command?

Nowadays many users don’t want to shutdown their Laptops, Instead of shutting down they just simply close the Lid of the laptop. Windows 10 is built to respond to closing the lid by putting the computer into four different states (Do nothing, Sleep, Hibernate, and Shutdown). You can choose any option to set the response. Most of the users choose sleep or hibernate option, so whenever they close the laptop lid, the system will automatically get to that particular mode. Usually to change the lid option we use control panel power settings. This article will guide you to change when I close the Lid option using Powercfg Command.

Powercfg or powercfg.exe is a command-line utility that is used to manage all Configurable Power system settings. Powercfg is around for many years and it was first introduced in Windows XP SP2 in 2004. Powercfg command allows you to create, edit, and delete power planes without using the control panel.

Change When I close the Lid option using Powercfg:

Note: You need admin privileges to operate Powercfg command.

First, you need to get the list of power plans available on your computer and then change the settings according to the power plan.

Open the command Prompt in elevated mode and type the following command and hit enter.

Powercfg /L

This command will list out all the Power Schemes available on your computer.

list powerscheme powercfg command

Once you execute this command you will get the Power Scheme GUID, Just copy paste the GUID in any text editor.

Next you need to execute the following command with the GUID. There are two sets of requirements available. One is ON battery and other one is when plugged in the charger. You have to make changes for both or at least one based on your requirement.

To change that setting we are going to use the following powercfg command.

  • -setacvalueindex
  • -setdcvalueindex

So AC means when the laptop is connected to the charger and DC means when it is running on the battery.

Now type the following command with the appropriate values.

powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 <LIDValues>

powercfg -setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 <LIDValues>

LID Values:

  • 0 = Nothing
  • 1= Sleep
  • 2= Hibernate
  • 3= Shutdown

In the command you need to change the LIDVALUE. So the actual command will look like this.

execute the command to change Lid option using Powercfg

Eg: powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 3

This command will Change When I close the Lid option. You can verify it using control panel power settings.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top