Get-MgProfile : The term 'Get-MgProfile' is not recognized as the name of a cmdlet, function, script

Iron Contributor

Hi everyone,

 

The cmdlet Get-MgProfile is no longer available after updating to v2.1.0 

Even the link is no longer available: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.people/get-mguserprofile

 

What is the replacement Graph SDK cmdlet to get the existing Microsoft Graph PowerShell SDK connection profile name?

 

Thanks in advance.

3 Replies

@SystemEngineer 

 

Before, you had both the v1.0 and beta endpoint commandlets in the same module and could switch between them using Select-MgProfile (and check with Get-MgProfile, etc.)

 

Now, the v1.0 commandlets remain in the modules using the historical module names while the beta endpoint commandlets have been broken out of the previous modules and into their own standalone modules whose names are prefixed with Microsoft.Graph.Beta:

 

LainRobertson_0-1690812066287.png

 

The one exception is Microsoft.Graph.Authentication, which is common to both pathways.

 

Now that the v1.0 and beta commandlets no longer coexist within the same module namespace, there is no reason to have the various *-MgProfile commandlets.

 

Whether this is more or less convenient is a matter for debate but this is the new approach.

 

Cheers,

Lain

@SystemEngineer Cmdlets such as "Get-MgProfile" and "Select-MgProfile" stop working after installing or updating the Graph PowerShell to version above v2.0. To access the beta cmdlets, you must install a separate module. To learn more about the benefits of the beta module and its installation, refer to:
https://m365scripts.com/microsoft365/install-microsoft-graph-beta-module-discover-the-benefits/

If you are running a code that has v1.0 commands and you upgraded your Graph SDK on the Hybrid worker server or the server from which you run the scheduled scripts, it may be necessary to comment out the “Select-MgProfile beta” line (depends on the code).

If you want to access the beta endpoint commands and have upgraded your SDK to v2, you need to install the Graph Beta module as well. This way, you can use both modules (v2 & Beta) side by side without needing to switch profiles.

Refer for more info - https://cloudiffic.com/select-mgprofile-is-not-recognized/