Forum Discussion
Azure AD PowerShell v2 cmdlets not working, e.g. Get-AzureADPolicy
Which version of the Preview module you have, works fine here with 2.0.0.127. Make sure you are actually loading the correct module, as when you have matching cmdlets between both (Connect-AzureAD is the same for AzureADPreview and AzureADPreview). For example, open a fresh PowerShell window, do a Import-Module AzureADPreview, connect and then try running Get-AzureADPolicy.
- Han ValkJul 15, 2017Copper Contributor
Thank you very much! I was not aware that I had to import the module. Hope this wil change in the future so that the module loads automatically when start PowerShell like the MSOL module does.
- VasilMichevJul 15, 2017MVP
It does load, but you have matching cmdlets between the two modules, and the non-preview version takes precedence. Unless you load it explicitly :)
- rshah25Mar 22, 2021Copper Contributor
Hi Vasil,
when i am setting up for mapping policy on my Machin,
Somehow after all install module below is still not working - i am using with 2.0.2.129 AzureADPreview
Get-AzureADPolicy is not recognized as the nameof a cmdlet.........