Re: Power Management GPO?
- From: "Linn Kubler" <lkubler@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 25 May 2007 17:16:39 -0500
I have been working this afternoon on a script for just this purpose. I
have a power.bat file now that when run by the administrator sets the power
the way I want it. Of course that only works for the adminstrator.
I created a GPO and put the batch file in first as a startup script and when
that didn't work I tried it as a logon script. At first it didn't work,
then I linked it to the domain administrator's OU and then it worked for
that account. I tried liking it to the OU of my test user but that didn't
work.
Next I added my test user to the administrator's group of the local
computer, now it works. Looks to me like it's a rights issue at this point.
A normal user can't change the power settings so a logon script like this
won't work either. Or am I missing something here?
Thanks much,
Linn
Ok, now that I've linked my GPO to the administrators and services
"Jeremy" <jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5D7771AA-D92D-4A3D-9437-344807222726@xxxxxxxxxxxxxxxx
Well using a flag file on the hard disk might be easier then. This way
you can do it with a simple .cmd file.
Run powercfg from the command line with a /? and you will be able to build
the commands you want the set up a .cmd file as follows:
-->8 snip here
@ECHO OFF
IF NOT EXIST %TEMP%\powerscript.flg (
powercfg command 1
powercfg command 2
powercfg command n
ECHO finished > %TEMP%\powerscript.flg
)
-->8 snip here
The first line turns of local echoing of commands to the screen to make
the output cleaner.
The second line is the test to see if the flag file exists
The next three commands represent you doing your powercfg stuff
The next command writes the flag file so that next time the script runs,
it wont meet the condition so will skip all the powercfg stuff
The close bracket closes off the IF condition. It is very important that
it be on a line on its own in the script.
I can't remember if all power setting are per machine, but if some are per
machine and some are per user then you could split it up into 2 scripts,
one startup script and one logon script. The use of the %TEMP%
environment variable would mean that if you ran it as a logon script that
the powecfg commands would be run per user who logged onto the machine.
HTH
Cheers,
Jeremy,
"Linn Kubler" <lkubler@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23T4KAswnHHA.3460@xxxxxxxxxxxxxxxxxxxxxxx
Yes, that's what I'm finding. I have everything setup, I can see by
running gpresult on the client computer that the GPO's are being applied.
They just aren't taking effect.
With EZ-GPO there is a small client executable that needs to be
installed. I can't even get that to work. I can install it manually but
not using a GPO, even though gpresult shows it as being applied. I don't
know what the secret is to that.
I'm not familiar with POWERCFG but I'll look into it. I'm also not very
experienced at writing scripts but I'll take a shot at it. An example
would sure be helpful, especially the bit about the registry flag.
Thanks much,
Linn
"Jeremy" <jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A3D93BAF-3E24-44DB-B910-BCFBB6B0F1F1@xxxxxxxxxxxxxxxx
Power management settings are evil. Like a few other settings it
appears that the registry is just where they get stored. From my
fiddling it appears that you can change the registry setting but the GUI
setting doesn't change until next startup, or sometimes even ever. It
appears that the power management API probably retrieves the configured
values from here during system startup then stores them in memory or
somewhere else because now matter how much manual modification I did, I
could never get settings to stick, so here is my suggestion:
Use POWERCFG. If you simply want to set the settings once, write a
script that makes the changes and the drops in a registry flag to
indicate the state so that it doesn't keep running all the time. If you
want to set the settings for different times of the day as suggested by
another poster, then put in a scheduled task running as SYSTEM that
changes the settings based on the time of day. Adding the scheduled
task can also be scripted in a startup script using schtaks.exe.
Good luck.
Cheers,
Jeremy.
"Linn Kubler" <lkubler@xxxxxxxxxxxxxxxxxx> wrote in message
news:ejtsGPLnHHA.4516@xxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I'm trying to figure out how to set the power settings of the computers
in my organization. They are almost all Windows XP Pros, a couple
Windows 2000 Pro but I'm not going to worry about them right now.
I know that Microsoft set this up so that a standard User does not have
rights to change the power settings and so far I have not been able to
find a way to set them globally.
I have been looking at EZ GPO from Terranovum but it only gets me part
way there. There are a couple settings that it doesn't address. What
do you folks do, how do you handle this... or don't you?
EZ GPO sets the time outs for the User monitor timeout, System standby
timeout and Hibernation timeout, but what about the other settings?
Hard Disk timeout, Prompt for password when computer resumes from
standby, When I press the power button on my computer and Hibernate
enable/disable? How can I go about setting those options?
Oh, this is an active domain network with Windows 2003 Server domain
controllers.
Thanks in advance,
Linn
.
- Follow-Ups:
- Re: Power Management GPO?
- From: Jeremy
- Re: Power Management GPO?
- From: Jeremy
- Re: Power Management GPO?
- From: Jeremy
- Re: Power Management GPO?
- References:
- Power Management GPO?
- From: Linn Kubler
- Re: Power Management GPO?
- From: Jeremy
- Re: Power Management GPO?
- From: Linn Kubler
- Re: Power Management GPO?
- From: Jeremy
- Power Management GPO?
- Prev by Date: Re: Power Management GPO?
- Next by Date: Re: Power Management GPO?
- Previous by thread: Re: Power Management GPO?
- Next by thread: Re: Power Management GPO?
- Index(es):