Exchange Online PowerShell V2 module


Microsoft have released the new Exchange Online PowerShell module today, This module supports modern authentication and includes faster alternatives to common cmdlets.

The Exchange Online PowerShell V2 module contains a small set of new cmdlets that are optimised for bulk data retrieval scenarios. Until you create a session to connect to your Exchange Online organisation, you’ll only see these new cmdlets in the module. After you connect to your Exchange Online organisation, you’ll see all of the older remote PowerShell cmdlets.

The EXO V2 module uses Modern authentication for all cmdlets. You can’t use Basic authentication in the EXO V2 module.

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 organisation.

The new cmdlets in the EXO V2 module are listed in the following table:

New cmdlet in the EXO V2 moduleOlder related cmdlet
Connect-ExchangeOnlineConnect-EXOPSSession 
or 
New-PSSession
Get-EXOMailboxGet-Mailbox
Get-EXORecipientGet-Recipient
Get-EXOCASMailboxGet-CASMailbox
Get-EXOMailboxPermissionGet-MailboxPermission
Get-EXORecipientPermissionGet-RecipientPermission
Get-EXOMailboxStatisticsGet-MailboxStatistics
Get-EXOMailboxFolderStatisticsGet-MailboxFolderStatistics
Get-EXOMailboxFolderPermissionGet-MailboxFolderPermission
Get-EXOMobileDeviceStatisticsGet-MobileDeviceStatistics
Disconnect-ExchangeOnlineRemove-PSSession
Connect-IPPSSessionConnect-IPPSSession

Install the EXO V2 module

To install the EXO V2 module for the first time, run the following commands:

  1. Install or update the PowerShellGet module as described in Installing PowerShellGet.
  2. Windows PowerShell needs to be configured to run scripts, and by default, it isn’t. To require all PowerShell scripts that you download from the internet are signed by a trusted publisher, run the following command in an elevated Windows PowerShell window: Set-ExecutionPolicy RemoteSigned
    Notes:
    • You need to configure this setting only once on your computer. Read more about execution policies here.
    • If you don’t do this step, you’ll receive the following error when you try to connect:Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.
  3. Close and re-open the elevated Windows PowerShell window to get the changes from the previous steps.
  4. Run the following command from an elevated Windows PowerShell window: Install-Module -Name ExchangeOnlineManagement Enter Y to accept the license agreement.

Update the EXO V2 module

If the EXO V2 module is already installed on your computer, you can run the following commands to see the version that’s currently installed and update it to the latest version.

  1. To see the version of the EXO V2 module that’s currently installed, run the following commands: Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
  2. Run the following command to update the EXO V2 module to latest version that’s available in the PowerShell Gallery: Update-Module -Name ExchangeOnlineManagement Enter Y to accept the license agreement.Note: If you receive the following error related to the PowerShellGet module, see Step 1 in the previous Install the EXO V2 module section to update the PowerShellGet module to the latest version.The specified module ‘ExchangeOnlineManagement’ with PowerShellGetFormatVersion ‘<version>’ is not supported by the current version of PowerShellGet. Get the latest version of the PowerShellGet module to install this module, ‘ExchangeOnlineManagement’.If you need to update the PowerShellGet module, be sure to close and re-open the Windows PowerShell window before you attempt to update the ExchangeOnlineManagement module.
  3. To confirm that the update was successful, run the following commands:Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement

You can download the PowerShell command-lets today from:

https://www.powershellgallery.com/packages/ExchangeOnlineManagement/1.0.1

For more information, visit the Microsoft site below:

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s