command is not recognized.

Rising Flight 4,876 Reputation points
2024-11-23T19:52:26.2833333+00:00

i have installed the below powershell modules.I am getting error when i execute Get-AzADSubscribedSku command please guide me.

Install-Module -Name Az -AllowClobber -Force

Install-Module -Name "AzureAD"

Import-Module AzureAD

sku

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,813 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,840 questions
{count} votes

Accepted answer
  1. Abiola Akinbade 25,300 Reputation points
    2024-11-24T14:40:09.52+00:00

    Hello Rising Flight,

    You need to use the new Get-MgSubscribedSku command in thethe Microsoft Graph PowerShell SDK as AzureAD modules are deprecated. See:

    https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.directorymanagement/get-mgsubscribedsku?view=graph-powershell-1.0

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. SHREYA SINGH 0 Reputation points
    2024-11-24T06:08:42.2866667+00:00

    Hey Rising,

    Use this command on powersell

    Get-AzureADSubscribedSku
    
    
    0 comments No comments

  2. Xintao Qiao-MSFT 6,595 Reputation points Microsoft External Staff
    2024-11-25T02:42:29.54+00:00

    The above answers are all correct, and I will just summarise them here.

    Get-MgSubscribedSku is part of the Microsoft Graph PowerShell SDK and is part of the Microsoft.Graph.Identity.DirectoryManagement module. It provides a wider range of capabilities and permissions to access more Microsoft Graph API resources.

    Get-AzureADSubscribedSku is part of the AzureAD module. It is primarily used for Azure AD-related operations and has relatively few features.

    Microsoft is gradually migrating features to Microsoft Graph, so it is recommended using Get-MgSubscribedSku to ensure future compatibility and support.

    I am unable to test with Get-MgSubscribedSku due to permission restrictions, the test results with Get-AzureADSubscribedSku are as follows.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

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