A summary about Microsoft Graph API and PowerShell

Would you like to start with Microsoft Graph in PowerShell right now?
Then go to How to start with Microsoft Graph API in PowerShell.

Why the Microsoft Graph API, when modules work fine?

I have been working with the Microsoft Graph API in PowerShell for awhile now. I mainly use it to create reports and combine data. With 30 different customers, some of which have users over 30,000, it becomes almost impossible to do this via the regular PowerShell modules.

The main difference is time. Microsoft Graph processes the data in one go and then continues, while the regular module do this per Object.

I have older scripts that run with the modules in the regular way. I’ve managed to bring them back from 6 hours to 5 minutes. You can test this with Measure-Command.

Is it always Microsoft Graph > modules?

With reports or property manipulations that apply to multiple users, I first look at the Microsoft Graph API before going back to the PowerShell module.

When it comes to troubleshooting and for example looking up different properties or testing a user account, I use the regular modules.

Sometimes you don’t know what the property is under. Is this in Exchange Online for example under:

  • Get-User
  • Get-Mailbox
  • Get-MailboxStatistics

This is faster with the Exchange Online V2 module than Microsoft Graph. Or do you know how this can be done faster? I do always prefer PowerShell over the GUI though, because not always are all properties shown in the GUI.

How will this work and what exactly will you explain to us about Microsoft Graph and PowerShell?

I’m going to write blog posts and they will be in the menu under MSGraph Summary.

I’ll add additional posts that are frequently visited or that I find important.

Leave a Reply

Your email address will not be published. Required fields are marked *