Not able to find Azure AD Preview command even after installing Preview module

ShashankSaxena-2458 131 Reputation points
2022-05-27T14:16:56.31+00:00

Hello All,

I hope all are doing good.

I have installed AzureADPreview module in the powershell using command(Install-Module -Name AzureADPreview) and it went successfully but when I am trying to access Azure AD Preview command using the command( Get-Command -Module azureadpreview), I am not getting any output likewise we are getting in command(Get-Command -Module azuread).

Can anyone help me to troubleshoot this issue because I need to create Azure AD Policy and without preview, we are unable to do it.

Regards,
Shashank Saxena

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,452 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 141.5K Reputation points MVP
    2022-05-27T14:51:55.43+00:00

    now Run:

    Import-Module azureadpreview
    

  2. JamesTran-MSFT 36,361 Reputation points Microsoft Employee
    2022-05-27T15:55:54.947+00:00

    @Anonymous
    Thank you for your detailed post!

    When running the Get-Command -Module azureadpreview cmdlet, you'll have to first login to Azure AD to get all the available commands associated with the Azure AD Preview module.

    #Install AzureADPreview Module using -Force since I already have it installed  
    Install-Module -Name AzureADPreview -Force  
      
    #Login to AzureAD  
    Connect-AzureAD  
          
    #View all available cmdlets  
    Get-Command -Module azureadpreview  
    

    206198-image.png

    Additional Link:
    How To Install AzureAD Preview PowerShell Module - 3rd party link showing you how to Install the Preview Edition of the new AzureAD PowerShell Module.

    I hope this helps!

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.