Edit

Share via


Set-EntraBetaDirSyncEnabled

Turns directory synchronization on or off for a company.

Syntax

Default (Default)

Set-EntraBetaDirSyncEnabled

    -EnableDirSync <Boolean>
    [-Force]
    [-TenantId <String>]
    [<CommonParameters>]

Description

The Set-EntraBetaDirSyncEnabled cmdlet turns directory synchronization on or off for a company.

A new service principal appears in your tenant when you enable or reenable DirSync. It has the appId 6bf85cfa-ac8a-4be5-b5de-425a0d0dc016 and the display name Microsoft Entra AD Synchronization Service.

Deactivating DirSync may take up to 72 hours, depending on the number of objects in your cloud subscription. Once disabled, the process cannot be canceled and must complete before you can take further action, including re-enabling DirSync.

If you re-enable DirSync, a full synchronization will occur, which may take significant time based on the number of objects in Microsoft Entra ID.

Additionally, if BlockCloudObjectTakeoverThroughHardMatch is enabled, re-enabling DirSync will block On-Prem to cloud object takeover/updates for all Microsoft Entra ID–mastered objects. To allow syncing of these objects, set BlockCloudObjectTakeoverThroughHardMatch to false.

Parameters

-EnableDirsync

Specifies whether to turn on directory synchronization on for your company.

Parameter properties

Type:System.Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TenantId

Specifies the unique ID of the tenant on which to perform the operation. This parameter provides compatibility with Azure AD and MSOnline for partner scenarios. TenantID is the signed-in user's tenant ID.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.