Configuration
The agent reads windows_reporting_agent.ini next to windows_reporting_agent_svc.exe before every report, so changes take effect on the next cycle without a restart. Any setting left out uses its default.
Agent settings
| Section | Setting | Default | Meaning |
|---|---|---|---|
| delivery | methods | https | One or more of https, cifs, scp, comma separated. Every listed method runs each cycle. |
| https | host | reports.example.com | Report server |
| https | port | 443 | 80 when use_https=0 |
| https | upload_path | /windows/upload/upload.php | Web path of upload.php |
| https | register_path | /windows/upload/register.php | Web path of register.php |
| https | use_https | 1 | 0 for plain HTTP (test servers only) |
| https | ignore_cert_revocation | 1 | Skip the CRL/OCSP check, for networks that block CRL servers (WinINet error 12057) |
| https | enrollment_token | (empty) | Token from the server's server.ini |
| cifs | share | (empty) | UNC path such as \\fileserver\reports |
| scp | host / port / user | / 22 / | SSH server and account |
| scp | key_file | C:\ProgramData\WindowsReportAgent\id_ed25519 | Private key with no passphrase |
| scp | remote_dir | (empty) | Directory on the SSH server |
| scp | known_hosts_file | C:\ProgramData\WindowsReportAgent\known_hosts | Host keys for the server |
| scp | strict_host_key_checking | yes | yes, or accept-new to save the host key on the first connection |
| scp | scp_path | %SystemRoot%\System32\OpenSSH\scp.exe | Path to scp.exe |
| scp | timeout_seconds | 120 | Stop a hung transfer |
| agent | report_interval_minutes | 45 | Minutes between reports |
| agent | report_dir | C:\ProgramData\WindowsReportAgent | Where the report is written before delivery |
| agent | log_file | C:\ProgramData\WindowsReportAgent\windows_report_agent.log | Result of the last delivery |
| agent | users_dir | C:\Users | Folder listed in the USERS section |
| agent | event_lookback_days | 30 | Days of Defender alerts to include |
| agent | data_dir | C:\ProgramData\WindowsReportAgent | Agent certificate and registration state |
The installer writes the [https] settings from its wizard pages or command line switches. Edit the file as an administrator: it is in C:\Program Files.
File share delivery
[delivery]
methods=cifs
[cifs]
share=\\fileserver\reports
The service runs as LocalSystem, so on a domain it connects as the computer account (DOMAIN\HOSTNAME$). Give the computer accounts, or the Domain Computers group, write access to the share and folder. The report is written under a temporary name and renamed, so a reader never sees a partial file. File share and SCP deliveries do not use the certificate registration: the share permissions or the SSH key control access.
SCP delivery
Create a key with no passphrase for the agent, add the public key to the SSH account's authorized_keys, and limit the private key to SYSTEM and Administrators:
ssh-keygen -t ed25519 -N "" -f C:\ProgramData\WindowsReportAgent\id_ed25519
icacls C:\ProgramData\WindowsReportAgent\id_ed25519 /inheritance:r /grant SYSTEM:F /grant Administrators:F
ssh-keyscan reports.example.com > C:\ProgramData\WindowsReportAgent\known_hosts
[delivery]
methods=https,scp
[scp]
host=reports.example.com
user=winreports
remote_dir=/var/lib/windows_reporting_agent/reports
Server settings
server.ini is found through the WRA_SERVER_INI variable that install_server.sh sets in .htaccess, or at /etc/windows_reporting_agent/server.ini. Keep it out of the web root: it holds the enrollment token.
| Section | Setting | Default | Meaning |
|---|---|---|---|
| paths | reports_dir | /var/www/html/windows/reports | Where accepted reports are saved |
| paths | data_dir | /var/lib/windows_reporting_agent | Registrations and replay protection data |
| registration | enrollment_token | (empty) | Shared secret the agents send when they register |
| registration | auto_approve_with_token | 1 | 1 approves an agent with the right token, 0 still needs an admin |
| upload | max_upload_bytes | 2000000 | Largest report accepted |
| upload | max_clock_skew_seconds | 300 | Largest clock difference allowed between agent and server |
| admin | require_remote_user | 1 | admin.php, status.php and report.php only run behind web server authentication |
| status | late_hours | 24 | A report older than this is late (warning) |
| status | missing_days | 15 | A report older than this is missing (error) |
| status | patch_max_age_days | 45 | Warn when the newest Windows update is older than this |
| status | required_apps | (empty) | Programs every computer must have, comma separated, * and ? wildcards |
| status | required_apps_skip_hosts | (empty) | Computers the required programs check skips, such as srv-* |
| status | unwanted_apps | (empty) | Programs no computer should have |
| status | public | 0 | 1 lets the status pages run without a login. Only for a demo with sample data. |
| status | reference_time | (empty) | Measure report ages from this epoch time, or fleet for the sample fleet's time |