Shutdown of PC


i am just starting with Openhab and i have one need.
I want to shutdown my Windows 10 PC from OpenHAB.

So for example if i set a status, that i go to sleep i want openhab to shutdown my pc.

Does anyone have an exaple how i can do that…
And maybe next step can be to send a wake on LAN package to the pc, so maybe you also have a solution for this too.

First stepp sould be to use the search function
Windows PC remote control (Shutdown, …)

You could also use the exec binding.

Here’s an example from my configuration. I also used the network binding.

Switch PC { channel="network:pingdevice:pc:online", wol="", exec=">[OFF:net rpc shutdown -C MESSAGE -I -U username%%password -f -t 0]" }

If your Firewall is active, you have to configure it.