Forum Discussion
Han Valk
Jul 14, 2017Copper Contributor
Azure AD PowerShell v2 cmdlets not working, e.g. Get-AzureADPolicy
Sorry if I posted this twice, to me it seems that the first post did not succeed. Installed PowerShellGet using the MSI. Installed the Azure AD PowerShell v2 GA module using Install-Module AzureAD....
VasilMichev
Jul 14, 2017MVP
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 Valk
Jul 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 :)