Connect to O365 exchange with powershell using session import

By Tom Kitching

It seems fairly obvious but a lot of people are unsure how to import a remote powershell session to O365. Simply do the following: [cc lang=”powershell”]$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session[/cc]

O365 – reverting hard matching migration using ImmutableID

By Tom Kitching

This is a very obscure problem, so I’m recording this more for my own reference in future rather than expecting anyone else to have the same issue! The issue occurs when a migration from a hybrid exchange domain to another domain which uses AD Sync has been completed in the following manner: filter/delete user in…

Confused about deprecated O365 commands?

By admin

I was getting pretty confused with the various options around powershell commands to use with Exchange online.  For example, to add a user to a distribution group in O365, I had come across 4 different commands: [cc lang=”powershell”]Add-AzureADGroupMember Add-AzureRMADGroupMember Add-DistributionGroupMember Add-MsolGroupMember[/cc] So after some digging I realised that the *-AzureRM* are powershell cmdlets to modify…

Powershell script for creating an O365 cloud mailbox within a hybrid exchange environment

By admin

I recently wrote this script that creates an O365 mailbox within a hybrid exchange environment, creating all the necessary attributes etc in exchange and AD Log all output to a local logfile, that is unique each time and won’t get overwritten [cc lang=”powershell”]Start-Transcript -Path $env:LOCALAPPDATA”CloudwyseLogs”$(get-date -Format ddMMyy_HHmmss)”.log” -NoClobber[/cc] Clear output from the screen to prevent…