save and shutdown WD

The Windows 7 Task schedule has the option to “Stop if on battery power” under the Conditions tab.