【发布时间】:2021-09-16 14:36:32
【问题描述】:
我已搜索文档,但看不到如何将现有用户作为所有者添加到 AD 组。
Add-AzureADGroupOwner -ObjectId $GroupObjectId -RefObjectId $UserObjectId 未被识别为命令。我正在使用的 Powershell 版本见附图。不使用 Azure Powershell 而是使用 Graph API 值得吗?
有关错误消息的示例,请参见第二张图片:
【问题讨论】:
-
您安装了 azure 广告模块吗?
-
我相信,通过运行 Install-Module -Name "AzureAD"
-
在运行脚本之前尝试 import-module AzureAD ?
-
我试过了,看到 Import-Module: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral...系统找不到指定的文件.
-
您是从安装模块的同一用户运行脚本吗?
标签: azure powershell azure-active-directory