Note
This article describes a Microsoft Graph beta feature. The mention resource is now documented on Microsoft Learn, but the /beta API can still change and is not supported for production use.
Note
This article describes a Microsoft Graph beta feature. The mention resource is now documented on Microsoft Learn, but the /beta API can still change and is not supported for production use.
The Microsoft Graph PowerShell SDK consists of dozens of modules. To install all of them, you can install the Microsoft.Graph module, which contains references to the individual modules. Because there are many modules, this can take some time.
If you only need specific commands, you can install and use only the modules that contain those commands.
You can use Microsoft Graph to get events from an Exchange Online mailbox. The Microsoft Graph PowerShell SDK makes this relatively easy to do with PowerShell.
Even when you use PowerShell, the API is Microsoft Graph. More complex implementations require some knowledge of Microsoft Graph. This article uses the Get-MgUserCalendarView cmdlet, so you should understand the basics of calendarView and the structure of the event resource.
This article explains how to manage Microsoft 365 licenses with the Microsoft Graph PowerShell SDK. Unless otherwise noted, the steps were tested with the following environment:
The Microsoft Graph PowerShell SDK is an open-source PowerShell module that makes it easier to use Microsoft Graph from PowerShell. The project is managed on GitHub, and the PowerShell module is distributed under the MIT license. Unlike a paid product, this module is provided for free under the MIT license, so Microsoft technical support may be limited or may not be available, depending on the issue.
Important
This article records procedures from 2021. Remote PowerShell for Exchange Online has been retired, so this connection method no longer works. Support for .NET 5 ended on May 10, 2022, and it no longer receives security updates or technical support. See the Exchange Team Blog on Remote PowerShell retirement, the Microsoft .NET lifecycle information, and the current Exchange Online PowerShell documentation. The sample below is a historical record; do not embed passwords in code.