Monday, December 7, 2015
[O365] Migrating mailbox to cloud
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session
---------------
$OnPremCreds = Get-Credential
$MigrationEndpointOnPrem = New-MigrationEndpoint -ExchangeRemoteMove -Name OnpremEndpoint -Autodiscover -EmailAddress henwal@azurelab.dk -Credentials $OnPremCreds
In this example, we will migrate all users listed in a CSV file located on our system partition:
$OnboardingBatch = New-MigrationBatch -Name MigrationBatch1 -SourceEndpoint $MigrationEndpointOnprem.Identity -TargetDeliveryDomain azurelab.mail.onmicrosoft.com -CSVData ([System.IO.File]::ReadAllBytes("C:\MigrationBatch1.csv"))
Start-MigrationBatch -Identity $OnboardingBatch.Identity