azure - 找不到如何加载包含 Get-MsolUser 的库
问题描述
我尝试使用 Get-MsolUser;我收到以下消息:
Get-MsolUser : Le terme «Get-MsolUser» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou program exécutable.
用英语讲 :
Get-MsolUser:术语“Get-MsolUser”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确并重试。
如何获得包含此 cmdlet 的任何包?
解决方案
来自:Powershell:术语“Get-MsolUser”未被识别为 cmdlet 的名称
cmdlet Get-MsolUser 属于 Azure AD Powershell (V1) 模块 (MSOnline),因此在使用此命令之前,我们需要安装并连接 MSOnline 模块。
安装 MSOnline 模块:
之前你需要下载一个可执行(exe二进制)文件来安装这个模块,但是现在微软已经使那个文件过期了,你只能通过powershell安装。使用以管理员身份运行的权限打开 Powershell 控制台并运行以下命令:
Install-Module MSOnline -Force
连接/导入 MSOnline 模块:
安装 MSOnline 模块后,运行以下命令连接 MSOnline 模块。
Connect-MsolService
# Once you connect MsolService, now run the Get-MsolUser command.
Get-MsolUser
注意:这是用于 Azure Active Directory 的旧版 MSOnline V1 PowerShell 模块。鼓励客户使用较新的 Azure Active Directory V2 PowerShell 模块而不是此模块。有关 V2 模块的详细信息,请参阅Azure Active Directory V2 PowerShell。
推荐阅读
- android - 运行 OWL API 5
- swift - swift sqlite count+where 总是返回 0
- matplotlib - 在 python 中安装 matplotlib
- apache-kafka - 一个 KafkaConsumer 监听多个分区 VS 多个 KafkaConsumer 监听多个分区
- php - 在 laravel 中为 mysql 数据库制作模型和控制器?
- vba - 条件格式化文本框
- python - 无法使用 pytorch [MNIST] 进行预测
- css - CSS 通配符 - 在类中寻找匹配
- python - 如何使用正则表达式在 XML 中获取具有特定值的元素?
- android - 带有retrofit2视频/图像损坏的AWS S3文件上传