Kaseya Community

Power Settings

  • I have an issue. I want to be able to script a power setting on the computer to set the scheme to always on. I ran the powercfg.exe command from the prompt and set the scheme to always on,but after a reboot it goes back to it's previous settings. I have tried capturing the reg key (maybe I am doing it wrong) but the reg key when imported does not bring the settings over.

    On the laptop I am having a similar issue there is a setting under the Advanced tab for "When I close the Lid" I want this option to be "Do Nothing" but I cannot get this to "stick" either. Anyone have a script for this?Sad


    Legacy Forum Name: Power Settings,
    Legacy Posted By Username: netprotect
  • Sorry,I misread the post...



    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: gssloan
  • This sounds mightbe a rights relayed issue. Since I run systems with LUA and I like this blog. You might check this out: http://blogs.msdn.com/aaron_margosis/archive/2005/02/09/370263.aspx

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: connectex
  • The power settings are on a per-user basis. You could set it for one user and then the next user would have different settings. There are also settings for the default user which is what (I believe) is used when no one is logged in (not positive if the default user, but they're different from the standard users).

    The way I do it is via a script I have scheduled to run recurring.

    I generally have it run once an hour (it is quick so it isn't really noticeable) though you could probably run it more often... you want to make sure that it runs for each user while they're still on and running.

    Basically, the script just runs an "execute shell command" using the credential (because standard users can't change the power settings) and runs

    powercfg /setactive "Always On"




    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: warever
  • We researched this, too, online and found a KB article, however, it only shares the particulars to make Balanced, High Performance or Power Saver.  Even if we set the Balanced or High Performance to the default, it still appears to allow for the disk to power down --NG!  If you find it, please advise.  The schemes are different for XP vs Vista/7.