Have WD Sharespace setup anyway quite similar to MBL.
Below just to share my experience.
Have written a bat file to be triggered by UPS agent software Winpower (UPS connected to W7 desktop) on power failure.
Initially used only command poweroff but realized that pressing power off button or shutting down NAS over web GUI acted differently, blue lights blinking for some time before actual poweroff triggered.
Quite obvious a set of actions performed before raw poweroff (unmounting of drives etc.).
Googled a lot and still no answers.
Anyway in NAS /etc directory there are shutdown and reboot scripts, instead of plain poweroff used “/etc/rc.poweroff” and voila clean shutdown works like a charm.
C:\PATH TO FILE\plink.exe root@IPADDRESS_OF_NAS -pw welc0me /etc/rc.poweroff
Had one more issue before getting everything running.
Could run my bat file from windows but on power failure NAS did not shut down.
Look at services, find UPS related ones and change Log On As (by default same is Local System) to user who has appropriate rights (administrator for example).