Change Group Policy (gpedit.msc) setting with a shortcut Solved

Page 1 of 2 12 LastLast

  1. Posts : 13
    Windows 10
       #1

    Change Group Policy (gpedit.msc) setting with a shortcut


    Is there a way to change a particular group policy setting (switch from enabled to disabled for example) with cmd, powershell or some other type of shortcut?
      My ComputerSystem Spec

  2. Brink's Avatar
    Posts : 37,883
    64-bit Windows 10 Pro build 18865
       #2

    Hello ekeda,

    Yes. You could use a .reg or .bat file to make changes to Registry Editor to change the group policy.

    Which group policy is this for? I'll be happy to look up its registry settings.
      My ComputersSystem Spec


  3. Posts : 13
    Windows 10
    Thread Starter
       #3

    Hi, Brink!

    This one (both plugged in and on battery):
      My ComputerSystem Spec

  4. Brink's Avatar
    Posts : 37,883
    64-bit Windows 10 Pro build 18865
       #4

    Here's the registry entries for both the "on battery" (DC) and "plugged in" (AC) policy.

    (Disabled)
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab]
    "ACSettingIndex"=dword:00000000
    "DCSettingIndex"=dword:00000000

    (Enabled)
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab]
    "ACSettingIndex"=dword:00000001
    "DCSettingIndex"=dword:00000001

    (Not Configured)
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab]
    "ACSettingIndex"=-
    "DCSettingIndex"=-
      My ComputersSystem Spec


  5. Posts : 13
    Windows 10
    Thread Starter
       #5

    Thank you, Brink, these are the keys indeed.

    Sadly, using the registry does not produce an immediate effect (enable/disable sleep) like the gpedit. Any ideas how to solve this besides restarting explorer/re-logging?
      My ComputerSystem Spec

  6. Brink's Avatar
    Posts : 37,883
    64-bit Windows 10 Pro build 18865
       #6

    You could create a .bat file to make the registry changes, and include restarting the explorer process at the end to apply.
      My ComputersSystem Spec


  7. Posts : 13
    Windows 10
    Thread Starter
       #7

    Yes, but I am looking for a more gentle solution. I'll mark the thread as solved, but if someone (or I eventually found) has another way to approach this, please share it here.

    Thank you, Brink, for the fast replies!
      My ComputerSystem Spec

  8. Brink's Avatar
    Posts : 37,883
    64-bit Windows 10 Pro build 18865
       #8

      My ComputersSystem Spec


  9. Posts : 13
    Windows 10
    Thread Starter
       #9

    I am thinking about leaving sleep on AC enabled, while disabled on DC. The question then becomes how to switch these (plugged in vs battery) with a software?
      My ComputerSystem Spec

  10. Brink's Avatar
    Posts : 37,883
    64-bit Windows 10 Pro build 18865
       #10

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab]
    "ACSettingIndex"=dword:00000001
    "DCSettingIndex"=dword:00000000
      My ComputersSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Group Policy in General Support
Hello. I have just had a virus that disabled My Firewall through Group edit. Problem is, I don't have group edit. With the store being broken, its bad. Any suggestions.
group policy error in General Support
I Setup a new PC for a friend on Saturday 28/11/15 Brand new desktop with Windows 10 Setup using a local Admin Account 2 days later - message appears on starting up (after the login prompt) The the PC is slow to respond , would not open...
Hello everyone. This is my first post to this forum. I hope someone can help me out. I am having a problem with Local Group Policy. I have been experimenting with this just for learning purposes and I am stumped by something. One of the first things...
Group policy :/ in General Support
Thanks to topgundcp https://www.tenforums.com/windows-updates-activation/2605-update-w-10-manually-2.html#post161679 Which got me piddling around with the whole group/ user policy crap I have found to get rid of the silly lock screen at startup...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 11:36.
Find Us