"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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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...
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

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
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
HG used my suggestions, but found specific details in a fully fleshed out artical to implement.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.