Any way to automate disable usb power down?

Flew for a little while earlier, all seemed to work, so i guess a lot might have been caused by some issue when the razer kaypad was connected :s

Would still be good to get that script working for all devices though, so thank you for sharing.