Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用新的MgGroupOwnerByRef/Microsoft Graph PowerShell模块1.1.0添加组所有者?_Powershell_Microsoft Graph Api_Microsoft Graph Sdks - Fatal编程技术网

如何使用新的MgGroupOwnerByRef/Microsoft Graph PowerShell模块1.1.0添加组所有者?

如何使用新的MgGroupOwnerByRef/Microsoft Graph PowerShell模块1.1.0添加组所有者?,powershell,microsoft-graph-api,microsoft-graph-sdks,Powershell,Microsoft Graph Api,Microsoft Graph Sdks,使用时,如何添加所有者?命令中没有特定参数-只有附加属性和正文参数,新的MgGroupOwnerByRef,用户id-可以通过获取MgUser,-必须作为URL引用放入哈希值@odata.id: Connect-MgGraph -Scopes "User.Read.All", "Group.ReadWrite.All" $group = New-MgGroup -DisplayName "my-new-group" -MailEnab

使用时,如何添加所有者?命令中没有特定参数-只有
附加属性
正文参数
新的MgGroupOwnerByRef
,用户id-可以通过
获取MgUser
,-必须作为URL引用放入哈希值
@odata.id

Connect-MgGraph -Scopes "User.Read.All", "Group.ReadWrite.All"

$group = New-MgGroup -DisplayName "my-new-group" -MailEnabled:$false -mailNickName "my-new-group" -SecurityEnabled

New-MgGroupOwnerByRef -GroupId $group.Id -AdditionalProperties @{"@odata.id"="https://graph.microsoft.com/v1.0/users/a0512e69-7815-4685-b916-e9da762a578f"}
此解决方案从版本1.1.0开始有效-在以后的版本中,此命令可能会得到增强,并具有用于添加所有者的特定参数