Probably not helpful as you are on MAAS 2.6, but maybe useful in the future or to somebody else that finds this post. In MAAS 2.9 a new maas.power
CLI command has been added, this allows you to directly interface with the MAAS power drivers. This will likely be a easier way to trigger the powering off that Bill suggested.
I did a show and tell on it back in June when I was working on it; Show and Tell: maas-power: a CLI tool to control power drivers