Migrate Exchange on-prem user to O365

Migrate users

a. Connect to Exchange On-line

From the PowerShell console on an Exchange 2010 server:

$Cred = Get-Credential
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

Import-PSSession $s

Type in your ada credentials with username of <username>@domain.com
Type in your ada credentials with username of domain\<username>
b. Run command to migrate user

New-MoveRequest –Identity <username or display name in quotes> -Remote -RemoteHostName autodiscover.companydomain.com -TargetDeliveryDomain companydomain.mail.onmicrosoft.com -RemoteCredential (Get-Credential) -BadItemLimit 40