CLI¶
Intune Commander includes a headless CLI app (ic) for automation, CI/CD, and scheduled backups.
Authentication¶
You can authenticate with either a saved profile or explicit tenant credentials.
Saved profile¶
Environment variables (CI-friendly)¶
export IC_TENANT_ID="<tenant-guid>"
export IC_CLIENT_ID="<client-guid>"
export IC_CLIENT_SECRET="<secret>"
export IC_CLOUD="Commercial"
ic export --output ./export --types all
Commands¶
Export¶
Import¶
ic import --folder ./export --profile Contoso-Dev
ic import --folder ./export --profile Contoso-Dev --dry-run
List¶
ic list compliance --profile Contoso-Prod --format json
ic list configurations --profile Contoso-Prod --format table
Profile¶
Output behavior¶
stdout: command output (JSON/table)stderr: progress and auth prompts (for example, Device Code messages)