Set-EntraDirSyncConfiguration

Modifies the directory synchronization settings.

Syntax

Set-EntraDirSyncConfiguration
   -AccidentalDeletionThreshold <UInt32>
   [-Force]
   [-TenantId <Guid>]
   [<CommonParameters>]

Description

The Set-EntraDirSyncConfiguration cmdlet modifies the directory synchronization settings.

Examples

Example 1: Set directory synchronization settings

Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All'
Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force

This command sets directory synchronization settings.

  • -AccidentalDeletionThreshold Specifies the accidental deletion prevention configuration for a tenant.
  • -Force Forces the command to run without asking for user confirmation.

Example 2: Set directory synchronization settings for a Tenant

Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All'
$tenantID = (Get-EntraContext).TenantId
$params = @{
    AccidentalDeletionThreshold = 600
    TenantId = $tenantID
    Force = $true
}

Set-EntraDirSyncConfiguration @params

This command sets directory synchronization settings.

  • -AccidentalDeletionThreshold Specifies the accidental deletion prevention configuration for a tenant.
  • -Force Forces the command to run without asking for user confirmation.
  • -TenantId Specifies the unique ID of the tenant.

Parameters

-AccidentalDeletionThreshold

Specifies the accidental deletion prevention configuration for a tenant.

Type:System.UInt32
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TenantId

The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.UInt32

System.Guid

Outputs

System.Object

Notes