Get-MgContactManager cmdlet 用于 Microsoft Graph PowerShell 中,检索分配给 Microsoft Entra ID 中特定组织联系人的经理详细信息。IT 管理员可以利用此命令跟踪汇报层级,确保准确的联系人管理。
使用 Get-MgContactManager cmdlet 之前,请确保以下事项:
Install-Module Microsoft.Graph -Scope CurrentUser
以下是如何使用 Get-MgContactManager cmdlet 获取 Microsoft Entra ID 联系人经理的方法:
Get-MgContactManager
-OrgContactId <String>
[-ExpandProperty <String[]>]
[-Property <String[]>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
示例 1:检索特定联系人的经理
Get-MgContactManager -OrgContactId 2763276-hb56-adas-3477-565868bcfyyf
示例 2:获取多个 Microsoft Entra ID 联系人的经理详细信息
$contacts = Get-MgContact | Select-Object Id
foreach ($contact in $contacts) {
Get-MgContactManager -OrgContactId $contact.Id
}
| 参数 | 描述 |
|---|---|
| -ExpandProperty | 此参数展开 Manager 属性,获取姓名、电子邮件和职位等详细属性。 |
| -OrgContactId | 此参数允许您指定要获取详细信息的组织联系人的唯一标识符。 |
虽然 Graph PowerShell 使管理员能够检索组织对象的详细信息,但由于其命令行界面和脚本要求,依赖它进行报告和管理可能较为繁琐。ADManager Plus 通过提供用户友好、无脚本的界面解决了这些挑战,支持 Microsoft 365 管理和报告。借助预定义、可定制和可调度的报告,ADManager Plus 简化了复杂的混合 AD 管理和报告,减少了对手动脚本的依赖。