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

[玩转系统] 删除-MsolGroup - 从 Office 365 中删除组

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

删除-MsolGroup - 从 Office 365 中删除组


PowerShell 中的 Remove-MsolGroup cmdlet 可从 Microsoft Office 365 中删除组。

下面给出了从 Azure Active Directory 删除组的语法。

Remove-MsolGroup
      -ObjectId <Guid>
      [-Force]
      [-TenantId <Guid>]
      [<CommonParameters>]

在本文中,我们将讨论如何使用 Powershell 中的 Remove-MsolGroup cmdlet 从 Azure Active Directory 中删除安全组。

如何从 Office 365 中删除安全组

要从 Office 365 中删除安全组,请在 PowerShell 中使用带有 -ObjectId 参数的 Remove-MsolGroup cmdlet。

-ObjectId 参数指定要删除的组的唯一 ID。

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

# Remove a security group
Remove-MsolGroup -objectid $GroupId.ObjectId

PowerShell 中的 Get-MsolGroup cmdlet 使用 -SearchString 参数搜索组并将组信息存储在 $GroupId 变量中。

Remove-MsolGroup 命令使用 -ObjectId 参数指定组 ID 并删除 $GroupId 中的组。

结论

我希望上述有关如何在 PowerShell 中使用 Remove-MsolGroup cmdlet 从 Office 365 中删除安全组的文章对您有所帮助。

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

相关链接

获取 MsolGroup

Set-Msol集团

新Msol集团

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

取消回复欢迎 发表评论:

关灯