Don’t want to do is fully manually? Download the Script at the bottom of the post. In case scripts don’t work you can contact me on [email protected]
open Powershell as an Admin
To start we need to install MSOnline module.
Install-Module -Name MSOnline
Conect to MSOnline using the following the command.
Connect-MsolService
you will now be promted to login using the admin credentials of Azure.
After logging in you can look up if a user has an InmutableID with the command below.
Get-MsolUser -UserPrincipalName [email protected] | fl
If you need to clear the ImutableID you will have to use the following command.
Set-MsolUser -UserPrincipalName [email protected] -ImmutableId “$null”
When the ImutableID is cleared you can create an Onprem user. This user must have the same UPN as the cloud user.
When the new user is created and you have the Active directory Synchronization Tool you can now use the command.
Script – Remove ImutableID and connect to a new onprem account (18 downloads )Start-ADSyncSyncCycle
Script