Category Archives: Office 365 & Exchange Online

Wildcards * in Cmdlet Get-MsolUser

Sometimes, even you work with things awhile, some shiny stuff get discovered :-) You missed sometimes a stupid easy wildcard search für Usernames in Office 365  for Powershell? –> Here we go…

xxxx = simple search string –> ‘contains’ OR ‘end with’ OR ‘starts with’ …whatever you like to know…

simple? yes :-)

cheers, Alex



Office 365 Username does not change after a Directory Synchronization

Issue – In the beginning of your Tenant-Creation you have played around with some cloud-only user, you gave them an E1, or E3/4 License or licensed Exchange Online solely. Last but not least, you provide this MSOL-User with a valid smtp alias.

Now, you are stepping forward in project and you establish a Directory Synchronization either with DirSync, AADSync or the soon coming AAD Connect tool. After the sync you realize that in Office 365 still the old username is valid and neither the UserPrincipalName (UPN) or the choosen  Alternate Login Name, get used as a new Username for login. Username is still the “old” one ->  “”

Solution – Even the softmatch is merging your cloud-only ID with the on premises Active Directory Object, you have to change the Username manually in Office 365 with following Powershell Cmdlet:

cheers, Alex



Hybrid Configuration Wizard fails with “Unable to connect to the remote server”

Issue – Running Exchange 2013 Hybrid Configuration Wizard (HCW) fails at the very beginning with following error:

Unable to access the Federation Metadata document from the federation partner. Detailed information: “Unable to connect to the remote server”


Solution – This is mostly related to a missing Proxy-Server configuration which is in between your Exchange on premises server and Exchange Online.

Firstly, you should check that the Internet Explorer has the right entries:2015-01-18 15_44_08-254 448 608 - TeamViewer

Secondly, check your winhttp settings with:

If there a “Direct” connection is configured you should import your IE settings with:

2015-01-18 15_44_46-254 448 608 - TeamViewer

Thirdly, also check your Exchange 2013 Server for a correct setting:

If that is empty, set the correct values:

Note: If your company security division forces a Proxy Authentication for that, this stuff is broken for ever ;-) – So get rid of that proxy authentication, at least for that piece of Exchange Server. There are ways to handle proxy auth but to be honest –> KIS – Keep it simple!

Finally, your HCW should allow to get finished now :-)

cheers, Alex

Onboarding to Exchange Online / Hybrid Migration to Office 365

Step 1 – Create User Mailboxes on premises

and migrate from YOUR source into the Mailbox onPrem. If you are coming from Lotus Notes, I would suggest tools from Binary Tree or Quest

Step 2 – Set forwarding SMTP Address to Source Email System

thats for the Delta-Migration time, days or weeks before your Outlook-Rollout. With this you can ensure that already migrated Exchange Online Users can send email to your legacy users

Example for this “MigUserGeneral.csv”

 Step 3 – Migrate your mailbox content to Office 365

Connect your Powershell to Exchange Online

(Note: If you don’t have already a MigrationEndpoint you have to create one. After this you can re-use this endpoint for each batch over and over.

(Note: This CmdLet is without the paramenter -AutoComplete which means that the move will suspend at 95%. Further the flip of the Cloud MailUser to the UserMailbox will not occure. The benefit is, that you can move the big data weeks before and cool down :-) Remember: In this state = AutoSuspend the Migration-Service will contact your MRS-Proxy (Mailbox Replication Service) each 24h and will check for new content, and in the case of new content, move the stuff to the cloud. Here you will find information about the user.csv

Step 4a – Delete the forwarding SMTP Address to your legacy system on your on premises Exchange Server

Step 4b – Set forwarding SMTP Address on your legacy source to Office 365.

Remember that Microsoft has already done everything your you. MX Records for is already in place i.e

Step 4c – Migrate the rest from your source to all Exchange on premises mailboxes

Step 5 – Now your data is completely migrated to your on premises environment and you can move the last delta from 95% to 100%

(Note: the status AutoSuspend will switch to InProgress and finalize with Completed)

Step 6 – Post doings which some customers prefer

Connect your Powershell to Exchange Online & Office 365

Following Cmdlet will perform:

  1. Set all user calendar to LimitedDetails
  2. Set UsageLocation
  3. Set Office 365 License
  4. Set Mailbox Regional Settings

(Note: Use same .csv from Step 2)

have fun, Alex


“RelinquishedMDBFailover” status while migrating to Exchange Online

Issue: – You are migrating to Exchange Online

…and you are checking the big picture of your migration status with:

StatusDetail shows: “RelinquishedMDBFailover”

Solution: -IncludeReport

and you will see something like this:

16.04.2014 06:54:22 [DB3PR02MB060] Relinquishing job because the database failed over to ‘’.

cool, isn’t it? :-) MS is performing DAG failovers while you are sweating under your pillow ;-)

cheers, Alex