Install the new Exchange Online PowerShell V2 module
How to install the new Exchange Online PowerShell V2 (EXO V2) module. The new EXO V2 module allows you to connect to Microsoft 365 Services using MFA and includes new Exchange online PowerShell cmdlets.
Table of Contents
What's new in Exchange Online PowerShell V2
Nine new, improved cmdlets for retrieving mailbox properties and statistics
- Each EXO V2 cmdlet returns a small number of most commonly used mailbox properties vs the older cmdlets which, return all the properties of a mailbox
- Designed for more efficient bulk retrieval of thousands of objects
- Uses modern authentication (supports Multi-factor authentication)
- New cmdlets are prefixed Get-EXO*
- Older Exchange online cmdlets are still available
New EXO V2 module cmdlets
| Cmdlet | Description | 
| Get-EXOMailbox | View mailbox objects and attributes | 
| Get-EXORecipient | View mail-enabled objects (mailboxes, mail users, mail contacts, and distribution groups) | 
| Get-EXOCasMailbox | View mailbox client access settings (Outlook on the web, ActiveSync, POP, IMAP) | 
| Get-EXOMailboxPermission | View mailbox permissions | 
| Get-EXORecipientPermission | View SendAs permissions for a mailbox | 
| Get-EXOMailboxStatistics | Get mailbox statistics (size of the mailbox, number of messages) | 
| Get-EXOMailboxFolderStatistics | Get folder level statistics in a mailbox | 
| Get-EXOMailboxFolderPermission | Get folder level permissions in a mailbox | 
| Get-EXOMobileDeviceStatistics | Get mobile devices that are being used with a mailbox | 
Install Exchange Online PowerShell V2 Module
1 Install prerequisites
# Allow running remote signed scripts Set-ExecutionPolicy RemoteSigned # Install NuGet provider Install-PackageProvider -Name NuGet -Force # Install PowerShellGet Install-Module -Name PowerShellGet -Force
Close and re-open the PowerShell window
2 Install the Exchange Online V2 module
# Install the Exchange Online V2 module Install-Module -Name ExchangeOnlineManagement
Press Y for Yes when prompted to trust the repository
3 Connect to Exchange Online PowerShell V2 using MFA
# Connect to Exchange Online PowerShell Connect-ExchangeOnline -UserPrincipalName itadmin@planetexpress.live
Sign into Office 365 and approve the MFA prompt
4 Get a list of mailboxes
Run this command to get a small list of mailboxes to verify that you are connected to Exchange Online
# Get a list of 10 mailboxes Get-EXOMailbox -ResultSize 10
	   5 Disconnect the remote PowerShell session
# Disconnect the remote PowerShell session Disconnect-ExchangeOnline
References:
About the Exchange Online PowerShell V2 module
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2Connect to Exchange Online PowerShell
https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershellSet-ExecutionPolicy
by Author
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy
 
									 
									 
									 
                        
Comments