Migrate macro exclusions (Windows only)

If your device policy has macro exclusions for Script Control settings, you can migrate those exclusions to the Memory Protection settings using a PowerShell script.

Note:
  • The script does not migrate exclusion lists with multibyte characters. You must migrate these exclusions manually.

  • For instructions to migrate script control macro exclusions for tenants in the Aurora Multi-Tenant Console (MTC), see KB 42221231386907.

These actions are required:

  • Make sure that PowerShell is installed on your device and that PowerShell scripts aren't blocked by security software, including Aurora Protect.

    Note:

    If necessary, modify the device policy assigned to your device. In the Script Control settings, click the Block PowerShell console usage toggle to the off position.

  • Create a custom application integration for PowerShell with these API privileges:
    • Policies: Read, Modify
    • Users: Read
    Note:

    Make sure to record the API key and secret values. For instructions, see Enable access to the Aurora Endpoint Security User API.

These resources are required:

  • Tenant ID value
    Tip:

    To find the value in the Aurora Endpoint Security console, click Settings > Integrations.

  • Email address associated with an Aurora Endpoint Security console administrator account.
  1. Download the migration script from https://support.blackberry.com/community/servlet/fileField?entityId=ka63Z000000LFHs&field=Attachment_1__Body__s.
  2. Open a PowerShell command prompt and change the directory to the location of the script.
  3. Run the script in dry run mode to preview the migration. For example:
    POWERSHELL
    .\sc2memdef_copy.ps1 -copySCExclusions -allPolicies -dryRun -tenantId '<tenant_id>' -apiKey '<api_key>' -apiSecret '<api_secret>' -userEmail '<administrator@domain.com>' -region 'na'
    Where:
  4. Review the output file to identify and correct issues.

    If the output file has the error Entering Modify 'policy_name' Policy... logError : The requested policy has not been converted to MemoryProtection v2., it can indicate that the device policy was not edited recently. To resolve this issue, in the Aurora Endpoint Security console , open and save the device policy to refresh.

  5. Run the script for a test device policy. For example:

    For information about parameters, see Script migration parameters.

    POWERSHELL
    .\sc2memdef_copy.ps1 -copySCExclusions -policy '<test_policy>' -tenantId '<tenant_id>' -apiKey '<api_key>' -apiSecret '<api_secret>' -userEmail '<administrator@domain.com>' -region 'na'
    Where:
  6. After testing and validation, run the script for all device policies.
    POWERSHELL
    .\sc2memdef_copy.ps1 -copySCExclusions -allPolicies -tenantId '<tenant_id>' -apiKey '<api_key>' -apiSecret '<api_secret>' -userEmail '<administrator@domain.com>' -region 'na'
    Where:
  7. If the output file indicates that any macro exclusions weren't migrated, migrate them manually.
  8. Sign in to the Aurora Endpoint Security console.
  9. Click Policy > Device Policies.
  10. In the migrated device policies, on the Memory Protection tab, review the macro exclusions and delete any that don't apply to the Dangerous VBA Macro violation type.
  11. Optional: If necessary, delete the custom PowerShell application integration and re-block PowerShell scripts from running.