Note that the commands used to shutdown the single bay My Cloud units (both first gen and second gen) may not be the same as those used on the multi bay My Cloud units. This subforum, My Cloud, generally discusses the single bay/single drive My Cloud units, so various commands suggested here may or may not be appropriate for the EX2 Ultra.
One, if they haven’t done so already, may want to see the dedicated My Cloud EX2 subforum where the EX2 Ultra units are discussed. Assuming one is using OS3 - v2.x firmware and not the newer OS5 - v5.x firmware. There are a couple of discussions about using SSH to issue the shutdown command in that EX2 subforum.