Set-EntraDirSyncConfiguration

修改目录同步设置。

语法

Default (默认值)

Set-EntraDirSyncConfiguration

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

说明

该 Set-EntraDirSyncConfiguration cmdlet 修改目录同步设置。

在委派方案中,登录用户必须具有受支持的Microsoft Entra角色或具有必要权限的自定义角色。 此操作所需的最低角色为:

  • 全局管理员

示例

示例 1:设置目录同步设置

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

此命令设置目录同步设置。

  • -AccidentalDeletionThreshold 指定租户的意外删除防护配置。
  • -Force 强制命令运行而不要求用户确认。

示例 2:设置租户的目录同步设置

Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All'
$tenantID = (Get-EntraContext).TenantId
Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -TenantId $tenantID -Force

此命令设置目录同步设置。

  • -AccidentalDeletionThreshold 指定租户的意外删除防护配置。
  • -Force 强制命令运行而不要求用户确认。
  • -TenantId 指定租户的唯一 ID。

参数

-AccidentalDeletionThreshold

指定租户的意外删除防护配置。

参数属性

类型:System.UInt32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

-Force

强制命令运行而不要求用户确认。

参数属性

类型:System.Management.Automation.SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TenantId

要对其执行操作的租户的唯一 ID。 此参数为合作伙伴方案提供与 Azure AD 和 MSOnline 的兼容性。 TenantID 是已登录用户的租户 ID。

参数属性

类型:System.String
默认值:None
支持通配符:False
不显示:False

参数集

SetAccidentalDeletionThreshold
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):True
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。

输入

System.UInt32

System.Guid

输出

System.Object

备注