Pages

12 April 2021

The term is not recognized as the name of a cmdlet, function, script file, or operable program. How to connect from a specific module

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

That's strange, the command does get completed when tabbing after typing get-azureaddir.
The problem is it's an AzureADPreview module commandlet, so you have to connect to AzureAd from that module like so:

Connect to AzureAD with a specific module:
AzureADPreview\Connect-AzureAD

No comments:

Post a Comment