Get-EntraDirectoryObjectOnPremisesProvisioningError
在將本地目錄同步至 Microsoft Entra ID 時,會回傳目錄同步錯誤。
語法
Default (預設值)
Get-EntraDirectoryObjectOnPremisesProvisioningError
[-TenantId <String>]
[<CommonParameters>]
Description
當將本地目錄同步至 Microsoft Entra ID 時,會Get-EntraDirectoryObjectOnPremisesProvisioningError回傳 、 group或organizational contact實體的目錄同步錯誤user。
範例
範例 1:取得目錄同步錯誤
Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read.All'
Get-EntraDirectoryObjectOnPremisesProvisioningError | Format-Table -AutoSize
Id PropertyCausingError UserPrincipalName Category Value OccurredDateTime DisplayName OnPremisesSyncEnabled Mail
-- -------------------- ----------------- -------- ----- ---------------- ----------- --------------------- ----
cccccccc-2222-3333-4444-dddddddddddd ProxyAddresses PropertyConflict SMTP:ConflictMail@contoso.com 3/14/2022 11:46:44 PM ConflictMail1 True
eeeeeeee-4444-5555-6666-ffffffffffff UserPrincipalName PropertyConflict BlockSoftMatch1@contoso.com 7/4/2024 12:06:16 AM BlockSoftMatch1 True
此指令列出目錄同步錯誤,該錯誤包括 users、 groups、 或organizational contacts在本地同步至 Microsoft Entra ID 時。
範例 2:使用過濾時產生目錄同步錯誤
Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read'
Get-EntraDirectoryObjectOnPremisesProvisioningError | where-Object propertyCausingError -eq 'UserPrincipalName' | Format-Table -AutoSize
Id PropertyCausingError UserPrincipalName Category Value OccurredDateTime DisplayName OnPremisesSyncEnabled Mail
-- -------------------- ----------------- -------- ----- ---------------- ----------- --------------------- ----
cccccccc-2222-3333-4444-dddddddddddd ProxyAddresses PropertyConflict SMTP:ConflictMail@contoso.com 3/14/2022 11:46:44 PM ConflictMail1 True
eeeeeeee-4444-5555-6666-ffffffffffff UserPrincipalName PropertyConflict BlockSoftMatch1@contoso.com 7/4/2024 12:06:16 AM BlockSoftMatch1 True
此指令列出目錄同步錯誤,該錯誤包括 users、 groups、 或organizational contacts在本地同步至 Microsoft Entra ID 時。
範例 3:針對特定租戶取得目錄同步錯誤
Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read'
$tenant = Get-EntraTenantDetail
Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId $tenant.Id | Format-Table -AutoSize
Id PropertyCausingError UserPrincipalName Category Value OccurredDateTime DisplayName OnPremisesSyncEnabled Mail
-- -------------------- ----------------- -------- ----- ---------------- ----------- --------------------- ----
cccccccc-2222-3333-4444-dddddddddddd ProxyAddresses PropertyConflict SMTP:ConflictMail@contoso.com 3/14/2022 11:46:44 PM ConflictMail1 True
eeeeeeee-4444-5555-6666-ffffffffffff UserPrincipalName PropertyConflict BlockSoftMatch1@contoso.com 7/4/2024 12:06:16 AM BlockSoftMatch1 True
此指令列出目錄同步錯誤,該錯誤包括 users、 groups、 或organizational contacts在本地同步至 Microsoft Entra ID 時。
-
-TenantId指定租戶的唯一ID。
參數
-TenantId
該作業的唯一租戶 ID。 此參數提供與 Azure AD 及 MSOnline 合作情境的相容性。 TenantID 是已登入使用者的租戶 ID。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。