Microsoft.Graph PowerShell Module 2.0.0 GA released

Microsoft.Graph PowerShell Module 2.0.0 GA released

Hi All,

Just a few Hours ago, Microsoft has released Microsoft.Graph 2.0.0 PowerShell Modules as GA to the PowerShell Gallery.

What’s changed

If you want to learn more about the Changes to V2 read this

The “Select-MgProfile beta” is depreciated. Use the Beta Commands like Get-MgBetaUser.

Check the installed Version an what’s available from PowerShell Gallery

Get-InstalledModule Microsoft.Graph -AllVersions
Find-Module Microsoft.Graph

List all the Modules

Get-Module Microsoft.Graph.* -ListAvailabe

Uninstall all Microsoft.Graph Modules

Get-Module Microsoft.Graph.* -ListAvailable | Uninstall-Module -Force
Get-Module Microsoft.Graph -ListAvailable | Uninstall-Module -Force
Get-Module Microsoft.Graph.* -ListAvailable
Get-Module Microsoft.Graph -ListAvailable

The Microsoft Graph Beta Modules now have a separate Namespace. You need to use the -AllowClobber Parameter to install the Modules side by side.

Find-Module Microsoft.Graph
Install-Module Microsoft.Graph
Find-Module Microsoft.Graph.Beta
Install-Module Microsoft.Graph.Beta -AllowClobber

List the Wrapper Module

Get-InstalledModule Microsoft.Graph
Get-InstalledModule Microsoft.Graph.Beta

List the actual Modules

Get-InstalledModule Microsoft.Graph.*

List the actual Modules for Beta (much less than the regular one)

Get-InstalledModule Microsoft.Graph.Beta*

How to use the Module - just a simple Example

Connect-MgGraph -Scopes
Get-MgUser -UserId

How to use the Beta Module

Connect-MgGraph -Scopes
Get-MgBetaUser -UserId

Andres Bohren

PowerShell Logo