如何使用 Microsoft Graph PowerShell 更新 Entra ID 组

更新组可确保访问权限、成员资格和策略保持准确并符合组织需求。这通过防止未经授权的访问来增强安全性,并通过将合适的用户保持在合适的组中来改善协作。管理员可以使用 Microsoft Graph PowerShell 中的 Update-MgGroup cmdlet 来更新 Entra ID 组,但这需要较强的技术技能。为了简化流程并提升用户体验,ADManager Plus 提供了无脚本的替代方案,使管理员能够轻松批量管理和更新 Entra ID 组,节省时间并降低错误风险。

  • ADManager Plus
  • PowerShell
 

使用 ADManager Plus 更新 Entra ID 组

  1. 登录到 ADManager Plus 管理控制台。
  2. 导航至 Microsoft 365 > Management > Group Management
  3. 选择您要执行的组管理操作。ADManager Plus 帮助您执行多种操作,包括批量创建和修改组。
使用 ADManager Plus 管理 Microsoft 365 组

使用 Graph PowerShell 更新 Entra ID 组

前提条件

在使用 Update-MgGroup cmdlet 之前,请确保满足以下先决条件:

  • If the Graph PowerShell module is not installed, install it using this script:
    Install-Module Microsoft.Graph -Scope CurrentUser
  • Connect to Graph PowerShell with the following permissions (from the least to most privileged) to update an Entra ID group:
    Group.ReadWrite.All, Directory.ReadWrite.All,

使用 Update-MgGroup cmdlet

在 Graph PowerShell 中运行以下 cmdlet 以更新 Entra ID 组:

Update-MgGroup -GroupId <String>
[-ResponseHeadersVariable <String>]
[-AcceptedSenders <IMicrosoftGraphDirectoryObject[]>]
[-AdditionalProperties <Hashtable>]
[-AllowExternalSenders]
[-AppRoleAssignments <IMicrosoftGraphAppRoleAssignment[]>]
[-AssignedLabels <IMicrosoftGraphAssignedLabel[]>]
[-AssignedLicenses <IMicrosoftGraphAssignedLicense[]>]
[-AutoSubscribeNewMembers]
[-Calendar <IMicrosoftGraphCalendar>]
[-CalendarView <IMicrosoftGraphEvent[]>]
[-Classification <String>]
[-Conversations <IMicrosoftGraphConversation[]>]
[-CreatedDateTime <DateTime>]
[-CreatedOnBehalfOf <IMicrosoftGraphDirectoryObject>]
[-DeletedDateTime <DateTime>]
[-Description <String>]
[-DisplayName <String>]
[-Drive <IMicrosoftGraphDrive>]
[-Drives <IMicrosoftGraphDrive[]>]
[-Events <IMicrosoftGraphEvent[]>]
[-ExpirationDateTime <DateTime>]
[-Extensions <IMicrosoftGraphExtension[]>]
[-GroupLifecyclePolicies <IMicrosoftGraphGroupLifecyclePolicy[]>]
[-GroupTypes <String[]>]
[-HasMembersWithLicenseErrors]
[-HideFromAddressLists]
[-HideFromOutlookClients]
[-Id <String>]
[-IsArchived]
[-IsAssignableToRole]
[-IsManagementRestricted]
[-IsSubscribedByMail]
[-LicenseProcessingState <IMicrosoftGraphLicenseProcessingState>]
[-Mail <String>]
[-MailEnabled]
[-MailNickname <String>]
[-MemberOf <IMicrosoftGraphDirectoryObject[]>]
[-Members <IMicrosoftGraphDirectoryObject[]>]
[-MembersWithLicenseErrors <IMicrosoftGraphDirectoryObject[]>]
[-MembershipRule <String>]
[-MembershipRuleProcessingState <String>]
[-OnPremisesDomainName <String>]
[-OnPremisesLastSyncDateTime <DateTime>]
[-OnPremisesNetBiosName <String>]
[-OnPremisesProvisioningErrors <IMicrosoftGraphOnPremisesProvisioningError[]>]
[-OnPremisesSamAccountName <String>]
[-OnPremisesSecurityIdentifier <String>]
[-OnPremisesSyncEnabled]
[-Onenote <IMicrosoftGraphOnenote>]
[-Owners <IMicrosoftGraphDirectoryObject[]>]
[-PermissionGrants <IMicrosoftGraphResourceSpecificPermissionGrant[]>]
[-Photo <IMicrosoftGraphProfilePhoto>]
[-Photos <IMicrosoftGraphProfilePhoto[]>]
[-Planner <IMicrosoftGraphPlannerGroup>]
[-PreferredDataLocation <String>]
[-PreferredLanguage <String>]
[-ProxyAddresses <String[]>]
[-RejectedSenders <IMicrosoftGraphDirectoryObject[]>]
[-RenewedDateTime <DateTime>]
[-SecurityEnabled]
[-SecurityIdentifier <String>]
[-ServiceProvisioningErrors <IMicrosoftGraphServiceProvisioningError[]>]
[-Settings <IMicrosoftGraphGroupSetting[]>]
[-Sites <IMicrosoftGraphSite[]>]
[-Team <IMicrosoftGraphTeam>]
[-Theme <String>]
[-Threads <IMicrosoftGraphConversationThread[]>]
[-TransitiveMemberOf <IMicrosoftGraphDirectoryObject[]>]
[-TransitiveMembers <IMicrosoftGraphDirectoryObject[]>]
[-UniqueName <String>]
[-UnseenCount <Int32>]
[-Visibility <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm] [<CommonParameters&

支持的参数

以下是可与 Update-MgGroup 命令一起使用的一些重要参数:

参数 描述
-AcceptedSenders 此参数显示允许在组中创建帖子或日历事件的用户或组列表。
-AllowExternalSenders 此参数指示组织外部人员是否可以向组发送消息。
-AppRoleAssignments 此参数显示授予组的应用程序角色。
-AssignedLabels 此参数显示与 Entra ID 组关联的敏感度标签对(标签 ID,标签名称)列表。
-AssignedLicenses 此参数显示分配给组的许可证。

使用 Graph PowerShell 更新 Entra ID 组的限制

  • PowerShell 脚本在不同用例和场景下可能变得复杂。
  • IT 管理员可能需要花费大量时间调试错误,进而影响生产力。
  • 委派可能变得复杂,因为技术人员需要提升权限。

ADManager Plus 如何帮助您管理 Entra ID 组及更多内容

ADManager Plus 是一款具备全面 Entra ID 管理和报告 功能的身份治理与管理解决方案。它帮助您通过单一且用户友好的控制台执行复杂的管理任务:

  • 通过无脚本的集中式控制台 管理组、联系人、用户、许可证及其他 Entra ID 对象。
  • 通过 自动化 和协调跨多个平台的用户配置、撤销配置及许可证分配等任务,减少人为错误。
  • Delegate tasks 给技术人员,无需提升其本地权限。
  • 利用超过 200 个预置报告,密切监控您的 IT 环境。
  • 通过智能工作流监控委派活动。
  • 通过 AD、Entra ID 和 Google Workspace 备份与恢复确保业务连续性。

使用 ADManager Plus 执行无脚本的 Entra ID 管理和报告

 
  • 使用 ADManager Plus 更新 Entra ID 组
  • 使用 Graph PowerShell 更新 Entra ID 组
  • 使用 Graph PowerShell 更新 Entra ID 组的限制
  • ADManager Plus 如何帮助您管理 Entra ID 组及更多内容
Active Directory管理与报告的一站式解决方案
电子邮件下载链接 Email the ADManager Plus download link