For work correctly with Windows, you need to make sure that commands from the "net" family (to shutdown used the "net rpc ..." command) are available on the device with Homebridge.
For work correctly with MacOS, you must first set up SSH and a pair of access keys between your MacOS device and a device with Homebridge.