Hi
Henry,
I wasn't able to test this on Windows 10, but I did test it on Windows 11, and it's working as expected with the configuration we set up on the agent side.
Followed the steps below.
1. Install Wazuh agent on Windows 11 host.
2. Configure the remote command execution on the agent side.
When setting commands in a shared agent configuration, you must enable remote commands for Agent Modules.
This is enabled by adding the following line to the file
C:\Program Files (x86)\ossec-agent\local_internal_options.conf in the agent:
wazuh_command.remote_commands=1Then add
windows_hardening.bat into the
C: drive on the agent side, and add the blog explain bat script content into that file and save it.
After that, add this configuration into agent.conf file.
Wazuh agent group config<wodle name="command">
<disabled>no</disabled>
<command>powershell.exe C:\windows_hardening.bat</command>
<interval>7d</interval>
<ignore_output>yes</ignore_output>
<run_on_start>yes</run_on_start>
<timeout>0</timeout>
</wodle><wodle name="command">
<disabled>no</disabled>
<command>powershell.exe C:\windows_hardening.bat</command>
<interval>7d</interval>
<ignore_output>yes</ignore_output>
<run_on_start>yes</run_on_start>
<timeout>0</timeout>
</wodle><wodle name="command"> <command>powershell.exe C:\windows_hardening.bat</command>
<ignore_output>yes</ignore_output>
<run_on_start>yes</run_on_start>
After applying this configuration Click Save. It will restart the Wazuh agent once you save the file.
Then check the logs of the agent if it restarted successfully or not with the timestamp.

If the issue persists, let me know, and I'll try to replicate it on Windows 10. I'm currently using a Mac and can't deploy a Windows 10 Vagrant box since there isn't one available for ARM architecture. Just give me an update, and if it's still not working, I'll find a way to test it on Windows 10.
Let me know the update on this.