AD FastReporter includes a command-line tool, ADFastReporterCmd.exe, that executes scheduled tasks without the GUI. This is what Windows Task Scheduler calls when running automated reports, and you can also use it directly from scripts, batch files, or third-party schedulers.
ADFastReporterCmd.exe is located in the same folder as the main AD FastReporter application — typically C:\Program Files\AlbusBit\ADFastReporter\ or wherever you installed the product.
| Argument | Required | Description |
|---|---|---|
-t <id> |
Yes | The task ID to execute. This is the numeric ID shown in the Tasks list in the GUI. |
-d |
No | Enable debug logging for this execution. Writes detailed logs to the configured debug path. |
-p <password> |
No | Provide the AD connection password on the command line. Required if the task’s connection uses custom credentials and the password is not saved in Windows Credential Manager. |
Run task 1:
ADFastReporterCmd.exe -t 1
Run task 3 with debug logging:
ADFastReporterCmd.exe -t 3 -d
Run task 2 with an explicit password:
ADFastReporterCmd.exe -t 2 -p "MyP@ssw0rd"
When ADFastReporterCmd.exe executes a task, it follows this sequence:
Console output includes the license mode, task start/end times, record count, and any errors.
| Code | Meaning |
|---|---|
0 |
Success — task completed without errors |
100 |
Error — task failed (license invalid, connection failed, unexpected error) |
Check the console output or debug logs for the specific error message when exit code 100 is returned.
ADFastReporterCmd.exe uses its own configuration file, cmdsettings.json, located in the same directory. This file contains the database connection string that points to the shared SQLite database:
{
"ConnectionStrings": {
"SqliteConnection": "Data Source=%APPDATA%\\adfastreporter.db"
}
}
The %APPDATA% placeholder is resolved to %ProgramData%\AlbusBit\ADFastReporter\ at runtime. In most cases you don’t need to modify this file — it uses the same database as the GUI application by default.
If you’ve moved the database to a custom location using userSettings.json in the GUI, ADFastReporterCmd.exe reads that same userSettings.json from the application data folder, so both tools stay in sync.
ADFastReporterCmd.exe reads from and writes to the same SQLite database as the GUI application. This means:
While AD FastReporter has built-in Windows Task Scheduler integration (configured through the task’s Schedule tab), you can also use ADFastReporterCmd.exe with any scheduler or automation tool:
ADFastReporterCmd.exe -t <id>ADFastReporterCmd.exe as part of a larger automation workflow, check the exit code, and take action based on success or failureWhen using third-party schedulers, ensure the run-as account has read access to Active Directory and write access to the export folder (if file export is configured).
When using the -d flag (or when the task has “Enable debug logging” checked), detailed logs are written to:
%ProgramData%\AlbusBit\ADFastReporter\logs\
Log files are named by date and level, e.g., 2026-03-29_Debug.txt. These include the full LDAP query, field processing details, export operations, and email delivery status. The logs use the NLog framework and include timestamps, log levels, and the originating component.
A separate _MS_ prefixed log file captures Microsoft framework-level logging (Entity Framework, .NET runtime) which can help diagnose database or runtime issues.