I think just using runas is they way to go for me.

Code:

Run 'runas /user:USERNAME "powercfg /SETACTIVE POWER_SCHEME"'
$ReturnCode = SendKeys("PASSWORD")
$ReturnCode = SendKeys("{ENTER}")



But when I run this a box flashes on the screen to quick for me to read and the power scheme remains unchanged. The output in the original dosbox is:

C:\drive>pwrcfg.kix
Enter the password for USERNAME:
Attempting to start powercfg /SETACTIVE POWER_SCHEME as user "COMPUTERNAME\USERNAME"...

C:\drive>