Wol and shut down PC Windows 10


I try to start and shutdown 2 pc on windows 10
My openhab2 is on my raspberry pi (openhabian)

1/ PC HTC ip and D8-CB-8A-CB-3F-** for mac

I try create on items:
Switch PC_HTC “PC HTC” (network) { wol=“**”, exec=">[OFF:net rpc shutdown -C MESSAGE -I -U USER%%PASSWORD -f -t 120]" }

To test i launch on my openhabian:
net rpc shutdown -C MESSAGE -I -U USER%%PASSWORD -f -t 120

and the answer:
Could not connect to server
The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE

I must replace replace user and password?

If using DHCP has the router changed the IP address?

no its the same ip

i have verify with ipconfig /all

Did you have this working before and have you verified the correct user/password is correct?

no never trying that.

For the user password, its for the pc or for openhabian?

Should be the user and password for the PC your trying to access.

Also make sure that you have the Firewall either turned off (recommended for quick testing) or configured correctly.

FYI, You could also use mqtt to do the same thing. Here is a good tutorial.


Don’t forget to create a key otherwise you may get an error code (:
On the right-hand side, add a new 32-bit DWORD value named LocalAccountTokenFilterPolicy and set the value to 1.