Skip to content
Tobias Almén edited this page Jan 23, 2023 · 17 revisions

Arguments

List of available arguments that can be passed when running IntuneCD-startbackup.

Argument Description
-o, --output The format backups will be saved as, valid options are json or yaml. Default is json
-p, --path The path to which the configurations will be saved
-m, --mode The mode in which the script is run,
0 = devtoprod (backup from dev -> update to prod) uses os.environ DEV_TENANT_NAME, DEV_CLIENT_ID, DEV_CLIENT_SECRET
1 = standalone (backup from prod) uses os.environ TENANT_NAME, CLIENT_ID,CLIENT_SECRET
-a, --localauth When this paramater is set, provide a path to a local dict file containing the following keys: params:TENANT_NAME, CLIENT_ID, CLIENT_SECRET when run in standalone mode and
params:DEV_TENANT_NAME, DEV_CLIENT_ID, DEV_CLIENT_SECRET when run in devtoprod
-c, --certauth When using certificate auth, the following ENV variables is required:
  • TENANT_NAME
  • CLIENT_ID
  • THUMBPRINT
  • KEY_FILE
-i, --interactive When using interactive auth, the following ENV variables is required:
  • TENANT_NAME
  • CLIENT_ID
-e, --exclude List of objects to exclude from the backup, separated by space. Available options are:
  • assignments
  • AppConfigurations
  • AppProtection
  • APNs
  • VPP
  • Applications
  • Compliance
  • NotificationTemplate
  • Profiles
  • GPOConfigurations
  • AppleEnrollmentProfile
  • WindowsEnrollmentProfile
  • EnrollmentStatusPage
  • Filters
  • ManagedGooglePlay
  • Intents
  • CompliancePartner
  • ManagementPartner
  • RemoteAssistancePartner
  • ProactiveRemediation
  • PowershellScripts
  • ShellScripts
  • ConfigurationPolicies
  • ConditionalAccess
-f, --frontend Set the frontend URL to update with configuration count and backup stream. Requires os.environ API_KEY
-ap, --autopilot If set to True, a record of autopilot devices will be saved

Folder structure

When a backup is performed, the configurations will be saved using the following folder structure in the path specified in -p:

- Root
    - App Configuration
    - App Protection
    - Apple Push Notification
    - Apple VPP Tokens
    - Applications
        - Android
        - iOS
        - macOS
        - Windows
    - Compliance Policies
        - Message Templates
        - Policies
    - Conditional Access
    - Device Configurations
        - mobileconfig
    - Enrollment Profiles
        - Apple
        - Windows
    - Filters
    - Group Policy Configurations
    - Managed Google Play
    - Management Intents
        - Intent Type
    - Proactive Remediations
        - Script Data
    - Scripts
        - Powershell
            - Script Data
        Shell
            - Script Data
    - Settings Catalog

Run Backup locally

In the example below, since it is run from the terminal interactively, the -i argument is used for interactive authentication. Additionally, the backup's output will be in YAML format instead of JSON as specified in -o.

IntuneCD-startbackup -i -p /tmp/IntuneBackup -o yaml
Clone this wiki locally