Over the past few years, I’ve covered the evolution of the Exchange Online “V2” PowerShell module extensively. Back when the module was first announced, together with fellow MVP Ingo Gegenwarth we hosted a Webinar to explore its features in more detail. Due to popular demand, a second webinar followed few months later.
As Microsoft released new versions of the module, I covered features such as certificate-based authentication support, connecting via a client secret, multi-tenant scenarios, the removal of the WinRM dependence, to name a few. This hardly covers even half of the features the team has introduced, and you can find a more detailed release log over at the PowerShell gallery.
Now, the 3.0.0 GA version has been released, nicknamed “V3”, bringing official support for all those nifty features. Make no mistake, this is a major release, and one that you should switch to immediately. And I’m not talking only about the impending basic authentication deprecation. No, the V2 module addressed that a long time ago. What the V3 module brings to the table however is much more than that. By using the InvokeCommand method, all the familiar cmdlets have been reworked as direct, RESTful queries against an HTTPS endpoint. This not only gets rid of the WinRM dependencies, but brings speed, reliability and security improvements, while at the same time ensuring backwards compatibility, so that your existing scripts and solutions will continue working. And that’s a major feat!
The team has gone even further than that. While by default the new RESTful endpoint will be used, you can still create a Remote PowerShell session if for some reason you need to do so. This is made possible thanks to the -UseRPSSession switch, which you can provide when running the Connect-ExchangeOnline cmdlet. And to further enhance the automation capabilities, support for managed identities was introduced a while back (read about it in Tony’s article here).
I won’t bore you with more details, as they were already covered in all the articles I linked to above. The important takeaway here is to update to the V3 module as soon as possible, and say your goodbyes to good old Remote PowerShell!
And while I did mention that your existing scripts should just work, this doesn’t mean that you should not be reviewing them and make some changes to take advantage of all the goodness the V3 module provides. I know that’s what I will be doing in the next few weeks!