you could use relays to handle the power switching, and switch the relays