监控 Microsoft Entra ID 中的组成员身份对于确保正确的用户和设备拥有适当的资源权限至关重要。IT 团队通常需要检索组成员以审核权限、执行访问控制或管理组织内的访问权限。Microsoft Graph PowerShell 命令如 Get-MgGroupMember 允许管理员列出组成员,但此过程需要复杂的脚本和手动操作。
另一方面,ManageEngine ADManager Plus 提供了一个简化的、无需脚本的解决方案来检索和管理组成员。借助多个 内置报告 和 管理操作,您可以轻松查看、修改和跟踪 Microsoft Entra ID 组成员,无需编写脚本。
根据域和组筛选报告。
计划自动生成报告并导出为多种格式。
根据需求进一步筛选报告。
在运行 Get-MgGroupMember cmdlet 之前,请确保满足以下要求:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "GroupMember.Read.All", "Group.Read.All"
在 Microsoft Graph PowerShell 中使用 Get-MgGroupMember cmdlet 获取 Microsoft Entra ID 组成员列表。语法如下:
Get-MgGroupMember
-GroupId <String>
[-ExpandProperty <String[]>]
[-Filter <String>]
[-Property <String[]>]
[-Search <String>]
[-Skip <Int32>]
[-Sort <String[]>]
[-Top <Int32>]
[-ConsistencyLevel <String>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PageSize <Int32>]
[-All]
[-CountVariable <String>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
示例:获取组成员
Get-MgGroupMember -GroupId "your-group-id"
下表列出了可与 Get-MgGroupMember cmdlet 一起使用以获取 Microsoft Entra ID 组成员的关键参数。
| 参数 | 描述 |
|---|---|
| -All | 此列表显示所有页面。 |
| -ConsistencyLevel | 显示请求的一致性级别。 |
| -CountVariable | 表示集合中项目的总数。默认情况下,此变量将在全局作用域中设置。 |
| -Filter | 按属性值过滤项目。 |
| -GroupID | 这是组的唯一标识符。 |
注意:Microsoft 已宣布弃用 Azure AD PowerShell 并过渡到 Microsoft Graph PowerShell。