{"id":1734,"date":"2025-11-09T23:43:30","date_gmt":"2025-11-09T23:43:30","guid":{"rendered":"https:\/\/www.ultrexstaff.com\/?p=1734"},"modified":"2025-11-09T23:43:30","modified_gmt":"2025-11-09T23:43:30","slug":"powershell-and-command-power-settings-itemized","status":"publish","type":"post","link":"https:\/\/www.ultrexstaff.com\/?p=1734","title":{"rendered":"PowerShell and Command Power settings itemized"},"content":{"rendered":"\n<p><strong><br>Command Prompt<\/strong><\/p>\n\n\n\n<p><strong>1.&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><strong>Open an elevated Command Prompt:<\/strong><\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search for &#8220;cmd&#8221; in the Start menu.<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-click on &#8220;Command Prompt&#8221; and select &#8220;Run as Administrator&#8221;.<\/p>\n\n\n\n<p><strong>Disable hibernation:<\/strong><br>powercfg.exe \/hibernate off<\/p>\n\n\n\n<p><strong>Disable all sleep states (including standby):<\/strong><br>powercfg -change -standby-timeout-ac 0<\/p>\n\n\n\n<p>powercfg -change -standby-timeout-dc 0<\/p>\n\n\n\n<p><strong>PowerShell<\/strong><\/p>\n\n\n\n<p><strong>2.&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><strong>Open an elevated PowerShell window:<\/strong><\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search for &#8220;PowerShell&#8221; in the Start menu.<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-click on &#8220;Windows PowerShell&#8221; and select &#8220;Run as Administrator&#8221;.<\/p>\n\n\n\n<p>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Disable hibernation:<\/strong><br>PowerShell<br>Powercfg -Hibernate Off<\/p>\n\n\n\n<p>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Disable all sleep states (including standby):<\/strong><br>PowerShell<br>Powercfg -Change -Standby-Timeout-AC 0<\/p>\n\n\n\n<p>6.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Powercfg -Change -Standby-Timeout-DC 0<\/p>\n\n\n\n<p>7.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong>Key Points:<\/strong><\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>AC vs. DC:<\/strong>&nbsp;The &#8220;-ac&#8221; and &#8220;-dc&#8221; options in the&nbsp;powercfg&nbsp;command distinguish between when the computer is plugged in (AC power) and when it&#8217;s running on battery (DC power).<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Permanent change:<\/strong>&nbsp;These commands will permanently disable sleep and hibernation until you re-enable them.<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Elevated permissions:<\/strong>&nbsp;You need to run Command Prompt or PowerShell as an administrator for these commands to work.<\/p>\n\n\n\n<p><strong>To Re-Enable Sleep and Hibernation<\/strong><\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>To re-enable hibernation, use:<\/strong><\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;powercfg.exe \/hibernate on&nbsp;(Command Prompt)<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Powercfg -Hibernate On&nbsp;(PowerShell)<\/p>\n\n\n\n<p>\u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>To set specific timeouts for sleep modes, use the&nbsp;<\/strong><strong>powercfg<\/strong><strong>&nbsp;command with the desired timeouts in seconds.<\/strong><\/p>\n\n\n\n<p>Let me know if you&#8217;d like help customizing your timeout settings!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Command Prompt 1.&nbsp;&nbsp;&nbsp;&nbsp;Open an elevated Command Prompt: \u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search for &#8220;cmd&#8221; in the Start menu. \u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-click on &#8220;Command Prompt&#8221; and select &#8220;Run as Administrator&#8221;. Disable hibernation:powercfg.exe \/hibernate off Disable all sleep states (including standby):powercfg -change -standby-timeout-ac 0 powercfg -change -standby-timeout-dc 0 PowerShell 2.&nbsp;&nbsp;&nbsp;&nbsp;Open an elevated PowerShell window: \u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search for &#8220;PowerShell&#8221; in the Start menu. \u00b7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-click on [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,98,120],"tags":[],"class_list":["post-1734","post","type-post","status-publish","format-standard","hentry","category-command-line","category-it-knowledge-base-articles","category-windows","post-preview"],"_links":{"self":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1734"}],"version-history":[{"count":1,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions"}],"predecessor-version":[{"id":1735,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=\/wp\/v2\/posts\/1734\/revisions\/1735"}],"wp:attachment":[{"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ultrexstaff.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}