But when running the Get-AzureADPolicy I get the error that this cmdlet is not available as can be seen below.
PS C:\Users\Administrator> Get-AzureADPolicy Get-AzureADPolicy : The term 'Get-AzureADPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Get-AzureADPolicy + ~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-AzureADPolicy:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
RE: Azure AD PowerShell v2 cmdlets not working, e.g. Get-AzureADPolicy
Ok so I found out that I need to install the Azure AD PowerShell v2 preview module which I did. Unfortunately I still get the error that the Get-AzureADPolicy cmdlet is not recognized. I can use tab completion on Get-AzureADP and also Get-Help Get-AzureADPolicy is working.
Re: RE: Azure AD PowerShell v2 cmdlets not working, e.g. Get-AzureADPolicy
Which version of the Preview module you have, works fine here with 188.8.131.52. 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.