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

Office 365 Report / Auditing

Office365

Office 365 is continually evolving, expanding and improving – meaning new capabilities and opportunities, alongside the need to support adoption and manage change on an ongoing basis. Over the years I have been asked to do lots of On Premise current state assesments to help customers plan and check to ensure that their infrastructure is running optimally and meets current, and future, requirements. Recently however I have noticed an incline in requests from customers who want the same current state assesment for Office 365.

Whilst doing a bit of googling to see if there were any reporting tools that could ensure I capture key information on our customers tenant I was amazed at what I found, the following tool can be downloaded for FREE from Microsoft Technet and it ticks all the boxes:

To get your copy of the tool follow the link here: https://gallery.technet.microsoft.com/office/Office-365-Reporting-Tool-7987b4c2

Below are some screenshot from within the reporting tool:azure-overall-dashboard exchange-audit-overall-dashboard

sharepoint-overall-dashboardAdminDroid MFA Dashboard

What Can the Tool Do?

The tool provides detail reports on the following areas of Office 365

  • Azure Active Directory (43 reports)
  • Security Reports (22 Reports)
  • Exchange Online (99 reports)
  • SharePoint Online (35 reports)
  • OneDrive for Business  (11 reports)
  • Skype for Business (22 reports)
  • Yammer (20 reports)
  • Microsoft Teams (16 reports)
  • General Office 365 Reports (9 reports)

Reporting Capabilities Highlights

This Office 365 Reporting tool comes with advanced reporting capabilities which make tedious reporting task to an easier one.
  • Automatic Schedule –  Schedule one or more reports to run automatically at the configured time and delivered straight to your preferred mail-ids.
  • Rich Filters – Apply filter on any columns to see only the required information and save the filter for future use.
  • Easy Customization – Allow you to easily customize the reports by rearranging, adding or removing the columns and its size.
  • Report Export – Ability to export the reports to CSV, PDF, HTML, XLS or XLSX.

 

For me this tool will help me put together usefull documentation that we can present to customers and hopefully help plan a way forward with something that customers have aready invested in, I believe this FREE tool will help customers decide on a stratagy to develop their Office 365 utilisation for the better.

Exchange Online Delegation Rights

exchange-online

Managing Exchange Calendars with PowerShell.

Some companies I deployed Exchange or Office 365 would like to be able to view readable information in everyone’s calendar by default you only get Free or Busy information. The following script changes the default calendar permissions for ALL Users folders to Reviewer – This gives you readable / not editable information.

foreach($user in Get-Mailbox  -RecipientTypeDetails UserMailbox) {
$cal = $user.alias+":\Calendar"
Set-MailboxFolderPermission -Identity $cal -User Default -AccessRights Reviewer
}

Senior management sometimes have PA’s that will need delegate access to their calendar, this this will include view calendar items that are marked as private.

To Set the delegate to view private items in the calendar

Add-MailboxFolderPermission –Identity <delegates mailbox>:\Calendar 
–User <delegated mailbox> -AccessRights Editor -SharingPermissionFlags 
Delegate,CanViewPrivateItems

To Set the delegate to not view private items in the calendar

Add-MailboxFolderPermission -Identity <delegates mailbox>:\Calendar 
-User <delegated mailbox> -AccessRights Editor -SharingPermissionFlags 
Delegate

To remove any individual calendar permission

Remove-MailboxFolderPermission -Identity "delegates mailbox:\Calendar" 
-user "delegated mailbox"