Power management script