A power settings command lets you change sleep timers, display timeouts, and power plans without clicking through menus — most commonly on Windows, where the powercfg command handles nearly everything. On a Mac the equivalent is pmset in Terminal, and on Linux it is usually systemctl or powerprofilesctl. The quickest Windows example: open Command Prompt as administrator, run powercfg /list to see available power schemes, then powercfg /change standby-timeout-ac 30 to put the PC to sleep after 30 minutes on wall power. These tools change real system settings, so your account needs administrator rights, and you should note your current values first so you can put them back.

Menu and setting names change slightly between Windows versions, macOS releases, and Linux distributions, and command options differ too, so treat the exact spellings below as a starting point and check your system's own help output if something does not match.

What You'll Need

  • A Windows PC with administrator access (or a Mac or Linux machine if you are following the equivalent sections).
  • A way to open a terminal: on Windows, search for Command Prompt or PowerShell and choose Run as administrator; on Mac, open Terminal from Applications > Utilities.
  • A note of your current power settings so you can revert: the timeouts from Settings > System > Power & battery (older Windows 10 builds put these under Settings > System > Power & sleep), or a screenshot of the current values.
  • For one-off testing, some commands only need a standard command prompt; anything that writes a setting generally needs elevation.

Step-by-Step

  1. Open an elevated command prompt. Click Start, type cmd, right-click Command Prompt and choose Run as administrator. On Windows 11 you can also right-click Start and pick Terminal (Admin). Without elevation, read-only commands work but changes fail with an access-denied message.
  2. Record the current settings. Run powercfg /query and scroll through, or use powercfg /list to see your power schemes and note the active one. On a Mac, run pmset -g custom to print current sleep and display timers. On Linux, systemctl status sleep.target and powerprofilesctl get show the active state.
  3. List existing power schemes (Windows). Run powercfg /list. Each scheme has a GUID in braces and a friendly name such as Balanced or High performance. Copy the GUID of the scheme you want to work with.
  4. Change timeouts. On Windows, powercfg /change monitor-timeout-ac 10 turns the display off after 10 minutes on AC power, while powercfg /change standby-timeout-dc 20 sleeps the machine after 20 minutes on battery. Swap ac for dc to target battery power; use 0 to mean never. On a Mac, sudo pmset -b displaysleep 10 sleeps the display after 10 minutes on battery, and sudo pmset -c sleep 20 sets system sleep to 20 minutes on wall power.
  5. Pick or switch a power plan. On Windows, powercfg /setactive GUID activates a specific scheme, and powercfg /getactivescheme confirms which one is live. This is useful on laptops that need to stay awake on power but save battery when unplugged.
  6. Create a custom scheme for testing. Run powercfg /duplicatescheme GUID to clone an existing plan, then edit the copy with powercfg /change so your original stays untouched. Delete an unused scheme with powercfg /delete GUID.
  7. Check the result. Re-run powercfg /query or open Settings > System > Power & battery and confirm the sliders or dropdowns match what you set. On a Mac, pmset -g should show your new values. Changes apply immediately.
  8. Do it in PowerShell if you prefer. The same powercfg executable runs from an elevated PowerShell window, so you can script it: powercfg /change standby-timeout-ac 60 is valid there too.

Common Mistakes

Running the command without elevation is the most frequent failure; the command returns an error and nothing changes. Forgetting the ac or dc suffix is another: Windows expects standby-timeout-ac style keys, not a bare standby-timeout. Editing a GUID that belongs to a different scheme wastes time, so re-check powercfg /list before you change anything.

Using 0 carelessly disables the timeout and keeps a laptop awake until the battery dies; that is a real risk on machines left in a bag. On Macs, forgetting sudo means pmset reports success but writes nothing, and using -b when you meant -c changes the wrong power source. Typing the arguments in the wrong order also causes errors, since pmset reads the source flag before the setting name.

Another mistake is assuming a changed plan survives updates or vendor utility apps. Some laptop makers install their own power software that can override Windows settings, so check that software's own controls afterward.

Tips

  • Use powercfg /? at any point for the current list of options; it is the authoritative reference for your build and avoids guessing at syntax.
  • Export a scheme before experimenting: powercfg /export C:\path\scheme.pow GUID lets you restore it later with powercfg /import.
  • Name your custom scheme clearly, for example Kitchen PC Balanced, so future you knows what it does.
  • On a Mac, pmset -g custom is the fastest way to see the current battery and wall-power settings side by side before changing anything.
  • If you manage several machines, run the same commands from a script launched as administrator so every PC gets identical timeouts.

Troubleshooting

Access denied: close the window and reopen Command Prompt or PowerShell as administrator. If your account is not an administrator, ask the machine's owner to sign in.

The command reports success but settings look unchanged: confirm you edited the active scheme with powercfg /getactivescheme, and check whether the manufacturer's power utility is forcing its own values. On Macs, confirm you used sudo.

Invalid parameter errors: run powercfg /? or man pmset and compare the exact option name. A single typo in a GUID or setting name stops the command.

The PC still sleeps too soon: some systems have separate lid-close and sleep settings, plus scheduled maintenance or wake timers. Check powercfg /requests to see what is holding or forcing power transitions.

Restoring everything: set the original scheme active with powercfg /setactive, or re-import the exported .pow file. If you did not save the originals, the default Balanced scheme can be reset, but custom tweaks are lost, so backing up first is worth the minute.

Frequently Asked Questions

Does the power settings command work on Windows Home?

Yes. powercfg /list, /change, /setactive and /query work on Home and Pro editions when run as administrator. Some advanced options are only exposed on certain editions.

Can I use it to stop my laptop sleeping when I close the lid?

Yes, but the setting lives under a different option path than the timeouts. Run powercfg /? and look for the lid-close related setting, or change it in Settings > System > Power & battery, which is easier to find.

What is the Mac equivalent?

Terminal's pmset command. It needs sudo to write, uses -b for battery and -c for wall power, and pmset -g shows the current values.

Do these changes survive a restart?

Yes. Power schemes and timeouts are stored in system configuration, so they persist across restarts and updates until something explicitly changes them.

Can I undo a command if I set the wrong number?

Yes. Re-run the same command with the correct value, or restore your exported scheme. Nothing is permanent unless you delete the scheme itself.

Is it safe to run as administrator for this?

Yes for these commands, but keep the elevated window limited to power commands and close it afterwards. Avoid pasting commands you found online unless you understand what they change.