Microsoft.Graph PowerShell Modules 2.21.1 released

Microsoft.Graph PowerShell Modules 2.21.1 released

Hi All,

A few Hors ago, Microsoft has released the Version 2.21.1 of Microsoft.Graph and Microsoft.Graph.Beta Modules.

Release Notes

  • fix: adds workflow to publish docker image
  • fix: removes arm64v8 and armv7 platforms from docker since upstream image doesn’t seem to support it

I am using the new PSResourceGet here instead of the PowerShellGet commands.

I’ve changed the Scope from “AllUsers” to “CurrentUser” in this Article - with that you don’t need to Run PowerShell as Administrator anymore.

Show installed Versions and what’s available in PowerShell Gallery

Get-InstalledPSResource Microsoft.Graph -Scope CurrentUser
Get-InstalledPSResource Microsoft.Graph.Beta -Scope CurrentUser
Find-PSResource Microsoft.Graph
Find-PSResource Microsoft.Graph.Beta

Uninstalling the old Microsoft.Graph Modules

Get-InstalledPSResource Microsoft.Graph -Scope CurrentUser -ErrorAction SilentlyContinue | Uninstall-PSResource -Scope CurrentUser -SkipDependencyCheck
Get-InstalledPSResource Microsoft.Graph* -Scope CurrentUser -ErrorAction SilentlyContinue | Uninstall-PSResource -Scope CurrentUser -SkipDependencyCheck

Installing the New Microsoft.Graph Modules

Install-PSResource Microsoft.Graph -Scope CurrentUser -WarningAction SilentlyContinue
Install-PSResource Microsoft.Graph.Beta -Scope CurrentUser -WarningAction SilentlyContinue

List all the Modules

Get-PSResource Microsoft.Graph.* -Scope CurrentUser

Some basic testing

Connect-MgGraph -Scopes user.read.all -NoWelcome
Get-MgUser -UserId a.bohren@icewolf.ch
Disconnect-MgGraph

Or you can simply use my M365PSProfile Module - find the Documentation here: https://github.com/fabrisodotps1/M365PSProfile/

Install-PSResource -Name M365PSProfile
Add-M365PSProfile
Install-M365Module

Don’t forget to update the Microsoft.Graph Modules on Azure Automate for PowerShell 5.1 and 7.2. You can use my Azure Runbook for updating the Modules

Regards
Andres Bohren

M365 Logo

PowerShell Logo