0
点赞
收藏
分享

微信扫一扫

Microsoft Azure 排错:Get-AzureADUser执行命令失败

51CTO 博客地址:​ ​​​https://blog.51cto.com/14669127​​​

Azure培训视频地址:​ ​​​https://space.bilibili.com/2000820534​​

今天发现小伙伴运行Azure AD powershell 的Get-AzureADUser以获取Office 365用户时失败,收到如下错误消息:

The term 'Get-AzureADUser'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:16

+ Get-AzureADUser<<<<

    + CategoryInfo          : ObjectNotFound: (Get-AzureADUser:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

问题产生的原因:

Get-AzureADUser命令属于Azure Active Directory Powershell for Graph模块,因此在使用此命令之前,我们需要安装并连接AzureAD Powershell v2模块。

解决方案:

1.      以管理员身份执行Powershell,输入如下命令来安装Azure AD module。

Install-Module AzureAD -Force

2.      连接Azure AD Module,如下命令:

Connect-AzureAD

3.      然后在执行获取AAD user,如下命令:

Get-AzureADUser

执行成功,问题得到解决。

举报

相关推荐

0 条评论