I mean, isn't that one of the first things that you do, go to control panel power settings, advanced, change what power buttons do, advanced, shut off Fast Boot?
The default behavior is for the pc to stay powered-up behind the scenes.
(If you want 'off' to mean actual power-down, then you need to implement the above.)