Lab · Advanced · 60 min

Preview a sync scope change on an Entra Connect staging server

Use a staging server to see exactly what a filtering change would add or delete in Entra ID before the active server makes it.

What you need

  • A lab forest and test tenant with Entra Connect
  • A second server for staging mode

Steps

  1. Install in staging mode

    Import the active server's exported settings and tick Enable staging mode.

  2. Change OU filtering on staging

    Add a test OU to the sync scope.

  3. Run a full sync

    Let staging calculate the changes.

    PowerShell
    Start-ADSyncSyncCycle -PolicyType Initial
  4. Export pending changes

    Use csexport and CSExportAnalyzer.

    PowerShell
    cd "C:\Program Files\Microsoft Azure AD Sync\Bin"
    .\csexport.exe "<tenant>.onmicrosoft.com - AAD" C:\Temp\export.xml /f:x
    .\CSExportAnalyzer.exe C:\Temp\export.xml > C:\Temp\export.csv
  5. Read adds and deletes

    Filter the CSV on the operation column.

Check your result

Only the users in the test OU appear as adds, and there are no deletes.

Microsoft documentation

Disclaimer. These samples are provided as is, without warranty of any kind. Read and test every script in a non-production tenant before you run it, and run reports before any command that changes or deletes data.