Microsoft 365
Microsoft 365: Hard Match per ImmutableId mit Microsoft Graph
Mit den folgenden PowerShell-Befehlen führst du einen Hard Match über die ImmutableId durch.
Import-module ActiveDirectory
$guid =(Get-ADUser -Identity "Username").objectguid
$immutabelD=[system.convert]::ToBase64String($guid.tobytearray())
Connect-MgGraph -Scopes User.ReadWrite.All
$User = Get-MgUser -UserId max.mustermann@domain.de
Update-MgUser -UserId $User.Id -OnPremisesImmutableId $immutabelD