PowerShell Scripts for Office 365 Migrations

For the past 3 months I have been hard at work with a client migrating from Lotus Notes to Office 365. Most migrations present some challenges, when coming from a system other than Exchange and migrating users to Office 36, there are additional challenges that present itself. In order to make the migration go smoother and to keep your own sanity, PowerShell scripts are necessary. With this migration I have an assortment of scripts that I have users and help with Forwarders, Retention Policies, Licensing and more.
Scripts and Background
One of the issues with this type of migration is Free Busy sharing between Office 365 and Lotus Notes users. This requires a bit of a special setup as well as a third-party tool to handle the query traffic between users of both email systems. In this scenario we used the Quest Coexistence product to provide this. This entails a multi-tiered approach to mailboxes and mail objects in Office 365. The underlying function of free busy has a dependency on the SMTP domain of the user to query. So we have this in Office 365:
Office 365 Users – User have a domain of @cloud.domain.com
Lotus Notes Users – A contact with @lotus.domain.com is used to direct email to Lotus Notes
Continue reading


Quick PowerShell Stuff 21 – Teams PowerShell Module

Last week I wrote that Microsoft had released their Teams PowerShell module. It was rumored to not be a great PowerShell module, which could be true as it would be inline with Microsoft’s current cloud release structure which is feature first, administration (PowerShell and more) last. However, for this article we will start with an open mind. Let’s see what this module brings to the table.
Getting the Teams PS Module
First, how do we get our hands on the module? First we can see what Microsoft has documented in their PowerShell Gallery – https://www.powershellgallery.com/packages/MicrosoftTeams/0.9.0. As we can tell from the link, this is still an early release as the module version is less than 1.0.0. The current list of cmdlets is small at the moment with a concentration on Team Users, Channels and Team configuration settings.
Now like a lot of modules available for PowerShell 5.0, we can either save the Teams PS module for later use or installation on another computer

Save-Module -Name MicrosoftTeams -Path <path><!--more-->

Or we can install the module with this one-liner:

Install-Module -Name MicrosoftTeams 

** Note ** Just remember that in order to install the module, you need to have Administrative rights (right click and ‘Run As Administrator’) for Windows PowerShell as well as Internet access to get the module from its repository. Continue reading

Quick PowerShell Stuff 20 – Teams and Skype

If you were Ignite you may have heard about the transition plans for Skype and Teams. Skype Online is being absorbed by Teams in order to provide a more unified experience. Whether or not the end user or administrator sees this as good or not, it is happening. Microsoft has also begun to add Teams cmdlets to the Skype connection point in Office 365.
Microsoft Informational Articles
Team PowerShell Cmdlet Releases
Here is a quick timeline of the cmdlets released (your Office 365 tenant may have received these cmdlets before or after mine, so YMMV)
Continue reading

Azure Cloud Shell Preview

Being a fan of PowerShell and having a lot of customers who are relying on the cloud means that Microsoft’s new ‘Azure Cloud Shell’ brings PowerShell awesomeness to your browser. Yes, I said Browser. To be fair, Microsoft has written up some fairly decent documentation on it and it can be found here – https://docs.microsoft.com/en-us/azure/cloud-shell/overview. While that is great for a place to start, what about its practical use? Just because a tool is available, doesn’t mean its what you need. In this article we’ll explore any known limitations, upsides and more about this new feature.
Firing Up Azure Cloud Shell
In order to access this new interface, make sure to log into your Azure tenant portal – https://portal.azure.com. Once logged in, you can see the PowerShell icon at the very top of the portal:
Continue reading

Exchange 2016 PowerShell Book – Second Edition Release

Dave and I have been working hard and we’ve now created a book that covers the breadth of Exchange 2016’s PowerShell features. With this new edition, we’ve added an additional 100+ pages of brand new content. We now cover these topics in-depth (in addition to all the topics in the first edition):

  • Public Folders
  • Security
  • Unified Messaging
  • Best Practices

The book is currently available at these locations:

Quick PowerShell Stuff 19

Having transitioned more and more to using PowerShell 5.0, instead of 4.0, I thought I would pass along one tip when using it. Typically when working with Exchange PowerShell and listing object attributes. I like to select a single column of the data and past it into a CSV file or documentation I am making. However, in PS 5.0, the default ‘Mark’ in PowerShell has changes. Instead of a single column, the select tool selects entire likes like so:
Continue reading

Exchange 2016 CU Upgrade Failure – ‘Database is mandatory on UserMailbox’

Recently I was contacted by one of my customers that their hybrid Exchange 2016 servers failed while upgrading to Cumulative Update 6 (CU6). They were not able to get past the error. Luckily for them, about 99% of the users in their environment were already moved to the cloud, so the end users were not directly affected by this server being down. The failure had occurred on Step 7 of 11, the Mailbox Role: Mailbox Service stage. So what was the cause? First, we can take a look at the error messages:

The detailed error message provide below in the error message:
Continue reading