Exchange Online PowerShell V2 module NOW AVAILABLE!

6/5/2020

On June 3, 2020, Microsoft announced general availability of the Exchange Online PowerShell v2 cmdlets. There has been some talk of these new cmdlets since the Microsoft Ignite 2019 conference, where they were first introduced.

The v2 module is now available for download in the PowerShell Gallery, and Microsoft recommends all Exchange Online customers start using the new cmdlets as soon as possible.

So, the obvious question that needs to be answered is…why?

Let’s start by discussing what v2 brings to the table. The v2 module, referenced as the EXO v2 module, contains all of the previously existing Remote Powershell cmdlets, as well as 9 new REST based cmdlets. These new cmdlets are designed to not only allow you to run the most commonly executed tasks, such as bulk data retrieval (we’re talking thousands and thousands of objects), creating/updating/removing objects, and configuring many of the Exchange Online features, but they allow you to do these things in a considerably faster and much more reliable way than their previous v1 counterparts.

Here’s a list of the cmdlets in the new EXO v2 module:

New cmdlet in the EXO V2 module

Older related cmdlet

Connect-ExchangeOnline

Connect-EXOPSSession or New-PSSession

Get-EXOMailbox

Get-Mailbox

Get-EXORecipient

Get-Recipient

Get-EXOCASMailbox

Get-CASMailbox

Get-EXOMailboxPermission

Get-MailboxPermission

Get-EXORecipientPermission

Get-RecipientPermission

Get-EXOMailboxStatistics

Get-MailboxStatistics

Get-EXOMailboxFolderStatistics

Get-MailboxFolderStatistics

Get-EXOMailboxFolderPermission

Get-MailboxFolderPermission

Get-EXOMobileDeviceStatistics

Get-MobileDeviceStatistics

Disconnect-ExchangeOnline

Remove-PSSession

Connect-IPPSSession

Connect-IPPSSession

For more information regarding these new cmdlets, check out Microsoft’s documentation, “Use the Exchange Online PowerShell V2 module”.

We have to wonder, is the amount of data processed and speed at which these cmdlets execute THAT much faster? Well, according to Microsoft and the monitoring and testing they’ve done, and feedback received by customers using these new cmdlets during the testing stage, in May 2020 alone, they saw 150 million commands executed at 4-8x faster speed and with more reliability than their predecessors. Keep in mind…that’s reporting for just ONE month!

The new cmdlets in the EXO V2 module are meant to replace their older, less efficient equivalents. However, the original cmdlets are still available in the EXO V2 module for backwards compatibility after you create a session to connect to your Exchange Online organization. Said another way, until you create a session to connect to your Exchange Online organization, you'll only see these new cmdlets in the module. After you connect to your Exchange Online organization, you'll see all of the older remote PowerShell cmdlets. This should make the transition easy and non-disruptive to you and your organization as you can begin using the new module when/if you choose, with no impact or required change to your day to day tasks or scripts.

Another great benefit of this new module is that it is entirely Modern Authentication based. This is a good thing because, as you may know, Basic Authentication is going away in Exchange Online. This was supposed to happen in April 2020, but Microsoft has postponed that change until the second half of 2021, due to many changes in priorities of customers battling the COVID-19 pandemic. Basic Authentication will still be disabled for newly created tenants by default, and they are planning to begin disabling it in tenants that have no recorded usage starting in October 2020. Of course, you can take this step to better security by blocking legacy authentication methods yourself at any time.

Why the switch from Basic to Modern Authentication? First, Basic Authentication means you don’t get support for true Single Sign-On. Also, today it’s necessary for many organizations to utilize Multi-Factor Authentication to protect accounts, and Basic Authentication doesn’t support this. Basic Authentication also uses simple HTTP login methods, rather than more complex OAuth-based authentication mechanisms used by Modern Authentication, so it’s much easier for a potential attacker to target a service like Exchange Web Services with a script or tool to attempt to guess user or admin passwords. To state it simply, the switch to Modern Authentication will provide a more secure connection.

You can't use Basic authentication in the EXO V2 module; however, to access the older cmdlets, a Remote PowerShell session must be established, which requires WinRM BasicAuth to be enabled on the client machine. The WinRM Basic Auth pipeline is essentially used for transporting Modern Auth tokens. If WinRM Basic Auth is disabled on the client machine, the new V2 cmdlets will continue to work (but the older RPS cmdlets will not). So, if your default WinRM settings have been modified, you may still need to configure the Basic authentication setting (it is enabled by default).

We are currently seeing only 9 new cmdlets in this new module, but Microsoft has stated they have plans to continue evolving and improving the module and are considering adding more cmdlets in the future. In fact, they are currently working on support for PowerShell Core (the current version works only on windows PowerShell version 5.0 and lower, and it doesn’t work on non-Windows Operating systems like Linux, Mac) and Service Principal and Certificate Based Authentication (to provide app-only authentication support).

Below you will find some links to documentation provided references and more information regarding the new EXO v2 module. If you’d like to get some hands-on instructor-led training on Exchange Online, consider attending one or more of our Microsoft 365 courses. We’d love to have you attend in person or virtually using our Virtual Training platform to help you save travel costs. And in case you didn’t know, however you choose to attend these courses, you will also receive a FREE Pearson Vue Certification exam voucher to get you moving down the road to certification!

For more information on Microsoft 365 courses, check out our upcoming schedule at www.LRSEducationServices.com.

Here are some courses that may be of interest to you:

MS--200 - MS-200: Planning and Configuring a Messaging Platform

MS--201 - MS-201: Implementing a Hybrid and Secure Messaging Platform

MS--900T01 - Microsoft 365 Fundamentals

MS--030T00 - Office 365 Administrator

If you have any questions or would like more information regarding courses scheduled at LRS Education Services, please call 877 832.0688 extension 1493 or email us at getsmart@LRS.com.

Penny Morgan
MCT, MCSA, MCITP, MCTS, MCSE, MCP
Microsoft 365 Certified: Fundamentals
Microsoft 365 Certified: Enterprise Administrator Expert
Microsoft 365 Certified: Security Administrator Associate
Microsoft 365 Certified: Messaging Administrator Associate
Microsoft Certified: Azure Fundamentals
Microsoft Certified: Azure Administrator Associate

LRS Education Services


References and documentation:

https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-and-exchange-online-april-2020-update/ba-p/1275508

https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-general-availability-of-the-exchange-online/ba-p/1436623

https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/exchange-online-powershell-v2/exchange-online-powershell-v2?view=exchange-ps

https://techcommunity.microsoft.com/t5/exchange-team-blog/faster-and-more-reliable-exchange-online-management-using/ba-p/1198604