Forum Discussion
Azure AD PowerShell v2 cmdlets not working, e.g. Get-AzureADPolicy
First uninstall using
UnInstall-Module AzureAD
then install the preview module
Install-Module AzureADPreview
- Steve RackhamMay 23, 2018Copper Contributor
Having same issue. If I import the AzureADPreview module only the same thing occurs, so its loading the AzureAD module in the background. You should be able to run both side by side for production.
Not happy.
- Doyle SpenceJun 13, 2018Copper Contributor
I have the same issue. The AzureADPreview module was working fine with 2.0.0.9 (I think that was the version) but updated to 2.0.11 I get the same experience. If I run Install-Module AzureADPreview, then run Connect-AzureAD, it loads AzureAD module and the Preview cmdlets can't be found... I can't run Preview cmdlets anymore.
- Doyle SpenceJun 13, 2018Copper ContributorFixed it by uninstalling all AzureAD and preview modules, then installing the AzureADPreview version 2.0.0.7 like this:
Install-Module -Name AzureADPreview -RequiredVersion 2.0.0.7
- Jamey SteinmannJun 14, 2018Copper Contributor
This worked. Installing the AzureADPreview module was failing as there were too many conflicting commands with the AzureAD Module. Once I uninstalled AzureAD and then Installed AzureADPreview (latest version 2.0.1.11) then everything worked as expected. Thank you
- Thom McKiernanFeb 01, 2019Brass Contributor
This worked for me. I had a new Win10 laptop and installing the preview (v2.0.2.5) would work but Get-AzureADPolicy didn't.
I just had to run "UnInstall-Module AzureAD" in a fresh elevated PowerShell console and then the preview cmdlets worked perfectly