This works:
Code:
RUN "runas /user:USERNAME notepad.exe"
$ReturnCode = SendKeys("PASSWORD")
$ReturnCode = SendKeys("{ENTER}")



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