Microsoft.Graph PowerShell Modules 2.14.0 released

Microsoft.Graph PowerShell Modules 2.14.0 released

Hi All,

Today Microsoft has released the Version 2.14.0 of Microsoft.Graph and Microsoft.Graph.Beta Modules.

Release Notes

  • [v2] Weekly OpenApiDocs Refresh
  • [v2] Examples Update in #2590
  • Changing policy scope type in preapproval cmdlets

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

Show installed Versions and what’s available in PowerShell Gallery

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

Uninstalling the old Microsoft.Graph Modules

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

Installing the New Microsoft.Graph Modules

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

List all the Modules

Get-PSResource Microsoft.Graph.* -Scope AllUsers

Some basic testing - since Microsoft.Graph 2.13.1 a the ResponseHeaders are included in the Result

Connect-MgGraph -Scopes -NoWelcome
Get-MgUser -UserId

That will break some Scripts because the Result is an Array with the Count of two. Users[1].DisplayName is empty, because the last entry in the Array are the ResponseHeaders.

There is an open Issue on GitHub Get-MgGroup v2.13.1 returns spurious ResponseHeader object

$Users = Get-MgUser -UserId

Foreach ($User in $Users)
	$DisplayName = $User.DisplayName
	Write-Host "DisplayName: $DisplayName"

Or you can simply use my M365PSProfile Module - find the Documentation here:

Install-PSResource -Name M365PSProfile

Andres Bohren

M365 Logo

PowerShell Logo