For those who are starting to work on O365 using powershell, here below are some short lines to help you.
Connect to O365 :
$cred=get-credential -Message "Please provide an O365 admin account" connect-msolservice -credential $cred $O365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $O365Session -AllowClobber
Add a licence to a user :
When you are doing a migration from Exchange to O365, there are two ways :
- Direct Migration
- Two step migration (provisioning then migrating)
If you choose the second way, you’ll have to check if all mailboxes are synced and not failed.