Install the Microsoft Entra provisioning Agent by using a CLI and PowerShell
Article
This article shows you how to install the Microsoft Entra provisioning agent by using PowerShell cmdlets.
Note
This article deals with installing the provisioning agent by using the command-line interface (CLI). For information on how to install the Microsoft Entra provisioning agent by using the wizard, see Install the Microsoft Entra provisioning agent.
Prerequisite
The Windows server must have TLS 1.2 enabled before you install the Microsoft Entra provisioning agent by using PowerShell cmdlets. To enable TLS 1.2, follow the steps in Prerequisites for Microsoft Entra Cloud Sync.
Important
The following installation instructions assume that all the prerequisites were met.
Install the Microsoft Entra provisioning agent by using PowerShell cmdlets
Tip
Steps in this article might vary slightly based on the portal you start from.
Import-Module "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Microsoft.CloudSync.PowerShell.dll"
Connect to Microsoft Entra ID by using an account with the hybrid identity role. You can customize this section to fetch a password from a secure store.
By default, the Microsoft Entra provisioning agent installs against the default Azure cloud environment. If you are installing the agent for use in the US government cloud do the following:
In step #8, add ENVIRONMENTNAME=AzureUSGovernment to the command line like the example.
This module examines the Microsoft Entra Connect Sync and Microsoft Entra Cloud Sync installation requirements, the options for installing and configuring the tools, and how to monitor synchronization services using Microsoft Entra Connect Health.