当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] Set-MsolGroup - 更新 Office 365 中的安全组

作者:精品下载站 日期:2024-12-14 06:27:35 浏览:13 分类:玩电脑

Set-MsolGroup - 更新 Office 365 中的安全组


PowerShell 中的 Set-MsolGroup cmdlet 会更新 Microsoft Office 365 中的安全组。此命令会更新该组的属性。

下面给出了更新 Azure Active Directory 中安全组属性的语法。

Set-MsolGroup
   [-ObjectId <Guid>]
   [-DisplayName <String>]
   [-Description <String>]
   [-ManagedBy <String>]
   [-TenantId <Guid>]
   [<CommonParameters>]

在本文中,我们将讨论如何在 PowerShell 中使用 Set-MsolGroup cmdlet 更新组的属性(例如描述)。

如何在 Office 365 中修改组的描述

要修改 Office 365 中组的描述,请在 PowerShell 中使用 Set-MsolGroup cmdlet 以及 -Description-ObjectId 参数。

-Description 参数指定要更新的组的显示名称,-ObjectId 参数指定要检索更新的组的唯一 ID。

# Get the group
$GroupId = Get-MsolGroup -SearchString "LabView"

# Update the description of the group                                                                  
Set-MsolGroup -ObjectId $Group.ObjectId -Description "ShellGeek Labview Group"       

PowerShell 中的 Get-MsolGroup cmdlet 检索与字符串“LabView”匹配的安全组,并将其存储在 $GroupId 变量中。

Set-MsolGroup 命令使用 $Group.ObjectId 通过指定的 -Description 参数更新组描述。

结论

希望上述有关如何在 PowerShell 中使用 Set-MsolGroup cmdlet 更新 Office 365 中组的属性的文章对您有所帮助。

您可以在 ShellGeek 主页上找到有关 PowerShell Active Directory 命令和 PowerShell 基础知识的更多主题。

相关链接

获取 MsolGroup

删除-MsolGroup

新Msol集团

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯