To perform a full synchronization between Active Directory (AD) and Azure Active Directory (Azure AD) using PowerShell, you can follow these steps:
Open PowerShell as an administrator.
Import the Azure Active Directory PowerShell module by running the following command:
Copy code
Import-Module AzureAD
Start the synchronization cycle by running the following command:
Copy code
Start-ADSyncSyncCycle -PolicyType Initial
This command initiates an initial synchronisation cycle between AD and Azure AD.
Wait for the synchronization to complete.
You can check the status of the synchronization by running the following command:
Copy code
Get-ADSyncConnectorRunStatus
This command displays the status of the synchronization cycle for each connector.
Once the initial synchronization is complete, you can run a full synchronization by running the following command:
Copy code
Start-ADSyncSyncCycle -PolicyType Delta
This command initiates a delta synchronization cycle, which synchronizes any changes made to AD objects since the last synchronization cycle.
Wait for the synchronization to complete. You can check the status of the synchronization by running the following command:
Copy code
Get-ADSyncConnectorRunStatus
That's it! These steps will synchronize your AD objects with Azure AD using PowerShell. Note that you may need to run these commands on the server running the Azure AD Connect tool, or on a machine with the Azure AD Connect tool installed and configured.
Comments
Post a Comment