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 ->  “whatever@YourTenantName.onmicrosoft.com”

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

451 4.7.0 Temporary server error. Please try again later. PRX4

Issue: Mail Delivery to your Exchange 2013 Server is broken

“51 4.7.0 Temporary server error. Please try again later. PRX4” You will find this error on following situations:

  1. Trying a simple “Telnet fqdn 25” after input of data.
  2. On your Frontend Transport Server SmtpReceive Logs.
  3. On an extended Office 365 / Exchange Online Message Trace Log (Mails delivery stays in “pending” to your Hybrid Exchange 2013 SP1 Server (equal to PowerShell: Get-Messagtrace -Status Pending)
  4. Mail in OWA get stuck in your Drafts folder (OK, that can have many other reasons)

Solution: either…

a) Tony wrote already a very good blog about one clue: http://thoughtsofanidlemind.com/2013/03/25/exchange-2013-dns-stuck-messages/

b) …and that is a tricky one on the right hand and so simple on the other hand -> Check:

If your HubTransport is on “Draining” – perform this:

Mail delivery is back :-)

have fun, Alex



Decommissioning Exchange 2003 – The final call Part 2

Issue 1 – You are ready to de-install Exchange 2003

You may receive the error-message: “One or more users currently use a mailbox store on this server. These users must be moved to a mailbox store on a different server or be mail disabled before uninstalling this server.”


Solution: Use NOT your Windows Server 2003 Active Directory Users and Computer.

Use a newer Server 2008 Domain Controller “Active Directoy Users and Computers” (or 2008 R2 / 2012 / 2012 R2) and perform a “Find” for all of your users inside your Domain(s). Extend the search result pane with the column “Exchange Home Server” and you may see (only here!) some users pointing to your legacy Exchange 2003 server.

And now? Go to them with your AD Attribute Editor and clear the Attribute: mxExchHomeServer

Voila, you are ready for the last last call –> de-installation – bye bye Exchange 2003 :-)

cheers, Alex























Decommissioning Exchange 2003 – The final call Part 1

Issue 1 – You are ready to de-install Exchange 2003

You may receive the error-message: “Setup encountered an error while checking prerequisites for the component “Microsoft Exchange”:  80072030 (8240): There is no such object on the server.”


Solution: Take your ADSI-Edit

and check in your AD Configuration Container: Services -> Microsoft Exchange -> Your Exchange Org -> Global Settings -> Message Delivery. Right mouse -> properties -> msExchAdminMailbox

If there is any orphant object like this:


just clear it an provide any (your choice) existing User-DN (Distinguished Name). Voila, you are ready for the last last call –> de-installation – bye bye Exchange 2003 :-)

Note: This was a mandatory Postmaster-Account in the past

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. http://technet.microsoft.com/en-us/library/jj218611%28v=exchg.150%29.aspx)

(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 http://technet.microsoft.com/en-us/library/dn170437%28v=exchg.150%29.aspx

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 @yourtenant.mail.onmicrosoft.com is already in place i.e sleekexchange.mail.onmicrosoft.com

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


Mobile phone battery drain with Kemp Loadbalancer

Recently I implemented two KEMP LM2600 at customer site (Exchange 2013 CU3 multi role servers). At the next day customers help desk got a lot of user complaints because battery life time of their mobile phones was reduced dramatically (iPhones using EAS – Exchange Active Sync)

Solution: In Network Options uncheck “Enable TCP Keepalives”

Kemp Keepalives

Kemp documentation is recommending this as well http://kemptechnologies.com/files/downloads/documentation/7.0/Configuration_Guides/Configuration_Guide-WUI.pdf

Enable TCP Keepalives
By default the TCP keepalives are enabled which improves the reliability of TCP connections that are long lived (SSH sessions). Keepalives are not usually required for normal HTTP/HTTP Services. The keepalive messages are sent from the LoadMaster to the Real Server and to the client. Therefore, if the client is on a mobile network, there may be an issue with additional data traffic.

My comment: At the end of the day I am asking why this setting is active per default? And why this can not be set for each VS – Virtual Service? Be aware that this is a global configuration and it my affect other Services / Real Servers. To be honest, this was the first time of seeing such a behavior.

Unable to locate WordPress Content directory (wp-content) & Host Europe

While updating Plugins or WordPress itself you get above error, or in German language “Das Verzeichnis “wp-content” konnte nicht gefunden werden”. As a side-effect, content-upload like picture uploads etc. will work after this instructions very smooth!

Don’t play around with 777 Permissions (like other blogs are doing…) on your folders. Host Europe has an own Security-Modell which make the stuff around more secure on the one hand but make WordPress work more difficult on the other one.

 Step 1

Add two directories to your WordPress Root-Directory with your favorite FTP Programm:your-Root-of-WP/tmp & your-Root-of-WP/wpcontent/upgrade

 1 2
 Step 2

Add this to the end of your wp-config.php (in the root of your WordPress)

 Step 3

Login to https://kis.hosteurope.de and change 2 settings:

1. In “Dateiverwaltung” change the user (Benutzer) from “ftpxxxx” to “wpxxxxx”, check “recursive”
2. In “FTP-Zugänge” also change from “ftpxxxx” to “wpxxxx”

Finally: HERE WE GO :-) Have fun with this lifetime safer.

Follow Alex Hofer on Twitter @sleekexchange

“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 ‘AM3PR02MB051.eurprd02.prod.outlook.com’.

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

cheers, Alex