Trying to reboot remote Windows PC from within Home Assistant - Brain Hurts

I previously had a setup where this was possible. Basically I had a command line script that created a ssh connection from the HA container to the host system and then called a “net rpc shutdown…” command directed at the Windows machine. The ssh part was only necessary because the net command was not available from within the HA container.

A different solution could be a dedicated tool running as a service on Windows that offers shutdown/restart/hibernate via HTTP call such as the first one from here https://www.raymond.cc/blog/how-to-remotely-turn-off-computer-from-lan-or-wan/