PowerShell Tip#2: Find a missing cmdlet

How to tackle “The term ‘Get-AzureADDirectorySetting’ is not recognized as the name of a cmdlet, function, script file, or operable program.”

This customer probably disabled Office Groups creation in his O365 Tenant. I had to check it via PowerShell.

By following this MS docs entry I received an error for an answer.

The term 'Get-AzureADDirectorySetting' 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.

I felt pretty smart by using “Find-Module” instead of googling around.

Find-Module -Command Get-AzureADDirectorySetting

This cmdlet tells us the module that contains the asked command.

Output of Find-Module

The only thing that was left was to install the missing module.

Install-Module AzureADPreview -AllowClobber

Done 😁

Author

  • Kai

    Hello you! My name is Kai Boschung and I live with my girl Dominique and our dog Nikita close to Bern, Switzerland.I work at Experts Inside and founded together with compadres the IoT consulting firm appery.