Mithun HaridasShort answer: Wazuh does not have an out of the box mechanism to push a custom Active Response script file to agents. The script has to physically exist in the agent's active-response/bin folder (see the documentation on custom active response scripts:
https://documentation.wazuh.com/current/user-manual/capabilities/active-response/custom-active-response-scripts.html), and there is no built in way to copy an arbitrary file there from the manager. This is intentional: allowing the manager to push and run arbitrary code on agents would mean a compromised manager could remotely control every connected endpoint, so that capability is disabled by default.
That said, there is a workaround that centralizes the script content and only requires one manual step per agent (not per deployment). It combines centralized configuration (
https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html) with the command monitoring module (
https://documentation.wazuh.com/current/user-manual/capabilities/command-monitoring/configuration.html):
1. Create a dedicated agent group for these Windows agents and place your custom AR script inside that group's shared folder on the manager, for example:
/var/ossec/etc/shared/<group>/custom-ar.cmd
2. In that group's agent.conf, add a command wodle that periodically checks the script in the local shared folder and copies it into active-response/bin whenever it changes:
<agent_config os="^Windows">
<wodle name="command">
<disabled>no</disabled>
<tag>ar-sync</tag>
<command>powershell.exe -ExecutionPolicy Bypass -Command "$b='C:\Program Files (x86)\ossec-agent'; $s=Join-Path $b 'shared\custom-ar.cmd'; $d=Join-Path $b 'active-response\bin\custom-ar.cmd'; if (Test-Path $s) { if (-not (Test-Path $d) -or (Get-FileHash $s).Hash -ne (Get-FileHash $d).Hash) { Copy-Item $s $d -Force } }"</command>
<interval>1h</interval>
<run_on_start>yes</run_on_start>
<ignore_output>yes</ignore_output>
<timeout>60</timeout>
</wodle>
</agent_config>
3. On each agent, add the following two lines to local_internal_options.conf once, then restart the agent:
wazuh_command.remote_commands=1
logcollector.remote_commands=1
We tested this end to end and confirmed the script does get copied into active-response/bin with the correct permissions once the wodle runs.
The important caveat: step 3 cannot be pushed remotely, and there is no way around it. It is a deliberate security boundary (this is by design, not a missing feature), so it has to be done once on every endpoint. If you are already rolling out these Windows agents through a deployment tool like GPO, Intune, or SCCM, the simplest approach is to include that local_internal_options.conf change as part of the same deployment package, so it is not an extra manual pass, it just rides along with the initial agent installation. After that one time step, any update to the script only requires editing the file once in the group's shared folder on the manager.