While playing around with Office 365 Groups expiration and the AzureADPreview module in PowerShell, I ran into the error below:
The term ‘Get-AzureADMSDeletedGroup’ is not recognized as the name of a cmdlet, function, script file, or operable program.
After a bit of trial and error, and some searching I found an important note in the Azure Active Directory PowerShell Module documentation. The documentation notes that the preview module cannot be installed on the same machine as the production module. I didn’t seem to have an issue actually doing the installation using the PowerShellGet Module, and tab completion for the cmdlets even worked, but the cmdlets would not work.
Indeed, after uninstalling the production module (Uninstall-Module AzureAD), I was able to work with the preview cmdlets.