Fix Azure AD Sync: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „Connect via Connect-MsolService Disable Directory Sync (could take up to 72h for completion, status shows false prior to that): <syntaxhighlight lang=powershel…“) |
|||
| Zeile 1: | Zeile 1: | ||
Connect via Connect-MsolService | Connect via Connect-MsolService | ||
| − | Disable Directory Sync (could take up to 72h for completion, status shows false prior to that): | + | Disable Directory Sync (could take up to 72h for completion, status possibly shows false prior to that): |
<syntaxhighlight lang=powershell>Set-MsolDirSyncEnabled –EnableDirSync $false</syntaxhighlight> | <syntaxhighlight lang=powershell>Set-MsolDirSyncEnabled –EnableDirSync $false</syntaxhighlight> | ||
| + | |||
Check status (should be false): | Check status (should be false): | ||
Version vom 27. Oktober 2016, 16:13 Uhr
Connect via Connect-MsolService Disable Directory Sync (could take up to 72h for completion, status possibly shows false prior to that): <syntaxhighlight lang=powershell>Set-MsolDirSyncEnabled –EnableDirSync $false</syntaxhighlight>
Check status (should be false):
<syntaxhighlight lang=powershell>(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled</syntaxhighlight>
Generate new ImmutableId from domain account for sourceAnchor (here: objectGuid):
<syntaxhighlight lang=powershell>[system.convert]::ToBase64String((Get-ADUser user).objectGUid.ToByteArray())</syntaxhighlight>
Set new ImmutableId for MsolUser:
<syntaxhighlight lang=powershell>Set-MsolUser -UserPrincipalName user@contoso.com -ImmutableId "01234567890123456789=="</syntaxhighlight>
Enable Directory Sync (only possible after disabling has completed, could take 24h hours after enabling to complete):
<syntaxhighlight lang=powershell>Set-MsolDirSyncEnabled –EnableDirSync $true</syntaxhighlight>