scripting out power switch