You have to mess around with power groups and position groups, and use

(device_set_power <device> <boolean>)
(device_set_position <device> <boolean>)

The problem is that I've never got it to work.