$AD_Username = "uzivatelske.jmeno"; $DELETE_UPN = "uzivatelske.jmeno@domena.cz"; $Azure_UPN = "email@domena.cz"; $guid = (get-Aduser $AD_Username).ObjectGuid $immutableID = [System.Convert]::ToBase64String($guid.tobytearray()) Install-Module MSOnline Import-Module MSOnline Connect-MSOLService $DELETE_UPN
Get-MsolUser -UserPrincipalName $DELETE_UPN | Remove-MsolUser Remove-MSOLuser -UserPrincipalName $DELETE_UPN -RemoveFromRecycleBin Set-MSOLuser -UserPrincipalName $Azure_UPN -ImmutableID $immutableID Start-ADSyncSyncCycle -PolicyType Delta
Žádné komentáře:
Okomentovat