Public, open-source library of maintenance and security scripts maintained by DataDike for SONAR. Every SONAR console ships with these scripts under Scripts > SONAR Library, ready to run on demand, in automation tasks or as script checks.
The scripts are plain PowerShell and work on their own too: read them, run them, adapt them.
| Category | Examples |
|---|---|
| Inventory | hardware summary, installed software, Windows activation, uptime and pending reboot |
| Cleanup | temp files and update cache (dry run by default), free disk space check |
| Windows Update | update health, days since last install, component reset |
| BitLocker | volume status, recovery key present and backed up, TPM and Secure Boot |
| Defender | protection status, signature update and scan, recent detections |
| Network | connectivity diagnostics, network stack reset, listening ports |
| Security | local administrators, firewall profiles, SMBv1, RDP security |
| Services | service running (optional start) |
The full list, with arguments and defaults, is in sonar_scripts.json.
- Windows PowerShell 5.1 compatible, run as SYSTEM.
- First output line is the verdict:
OK:,WARN:,FAIL:orINFO:. - Exit codes:
0OK,1FAIL,2WARN,3not applicable. In a SONAR script check, set2as a warning return code and3as an informational return code. - Anything that deletes or resets runs as a dry run unless you pass
-DryRun:$false. Nothing reboots unless you pass-AllowReboot. - No secrets are ever printed (for example, BitLocker recovery passwords).
See CONTRIBUTING.md for the full writing standard.
SONAR servers pin a release tag (for example v1.0.0), never the main branch. A new tag
reaches customers only when DataDike updates the platform. When a script leaves the library,
every customer that still uses it (in a check, task or alert action) keeps a copy as their own
script, so nothing stops working.
sonar_scripts.json manifest read by SONAR
scripts/<category>/ one file per script
templates/ starting point for a new script
tools/validate.ps1 validation run by CI on every pull request
powershell -NoProfile -ExecutionPolicy Bypass -File tools/validate.ps1Found a security issue in a script? Please do not open a public issue: report it privately via GitHub Security Advisories ("Report a vulnerability" on the Security tab).
MIT (c) DataDike