My colleague Andreas asked today for some help troubleshooting an issue he’d run into with the Create-LabUsers script failing while using the InflateMailboxes parameter.
The problem ended up being three-fold:
- I had some pre-populated user names that had spaces in them
- I hadn’t trimmed the spaces out when constructing the SMTP address (although I had for the UPN)
- I didn’t test for a valid RFC sender address when constructing the mail
So, all of those things together conspired to generate errors whenever some of those user names were hit. To resolve, I’ve updated the SMTP address generation to remove the spaces (to make them RFC-compliant and now test for a valid sender field.
The updated version is right where I left the old one: http://aka.ms/CreateLabUsers.

