"There are currently no power options available" Fix

Is there a way to run this automatically?  We have users who get "There are currently no power options available" and I was able to get power options by running it 2 machines so I think it'll work on many more here.

start, run  cmd with administrative rights

secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

and upon restart, they'll have power options.
H. G.Asked:
Who is Participating?
H. G.Author Commented:
I used the comments here to create GPO and added it to the PowerShell Scripts tab of the Startup Properties and it isn't working.
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
by Automatically, do you mean like, when a user logs on?

  because you could use a login script to do this, or a GPO to configure a start up or shut down script for computers to run this.

Alternatively, you could:

 save it as a script and have users run it manually
H. G.Author Commented:
I just want to run it once. So I've opted for creating a  script users can run themselves. FYI I'm concerned though since they don't have admin rights...will it run?

Anyway, I've copied the above commands to notepad and saved with .ps1 extension. The file on my desktop now has both .psi and .txt and when I click on it, it just opens the file...which isn't the desired result.
Pls help. Thanks.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

H. G.Author Commented:
I deleted the .txt so I'm think I'm good as the file is now a PowerShell Script but users need to run it and they aren't local admins...
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
they would need to be local admins to run this.
H. G.Author Commented:
Even if I created it as a Group Policy?
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
Logon scripts run in the logon user's security context.

You could try a startup or shut down script via gpo or otherwise.

Otherwise you would have to try doing a run-as and either have a username and password in the cms script.

(Or if clear text passwords are an issue, you could have a cmd script call a PowerShell command to read a credential file and echo the username and password into the batch file to save them as varibles to then do the run-as for the cmd script with the command in it.)

( Or cmd calls ps1 script with encrypted credentials and it invokes the command )

Also you have to use a PowerShell trick to make the cms prompt elevated no matter what.

Maybe you have a list of computers you are admin on and a server and you use PowerShell to do a loop and invoke the command on all of the other systems
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
HG used my suggestions, but found specific details in a fully fleshed out artical to implement.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.