Share via

Select-MgProfile and Get-MgProfile still relevant or not anymore?

EnterpriseArchitect 6,366 Reputation points
2023-07-17T13:05:59.0266667+00:00

After migrating my Microsoft Graph PowerShell module from v1.28 into v2.1, the below command no longer works or is needed.

Select-MgProfile
Get-MgProfile

Can someone please clarify if this is expected?

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author
  1. Rajith 80 Reputation points
    2024-02-14T12:34:13.6533333+00:00

    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/

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Andy David - MVP 160.2K Reputation points MVP Volunteer Moderator
    2023-07-17T13:43:57.9133333+00:00
    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.