Wol and shut down PC Windows 10

Hello,

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

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

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

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

and the answer:
Could not connect to server 192.168.0.24
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.

Hello!

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