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

[玩转系统] Get-MgUserLicenseDetail - 查看用户的许可详细信息

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

Get-MgUserLicenseDetail - 查看用户的许可详细信息


PowerShell 中的 Get-MgUserLicenseDetail cmdlet 获取指定用户的许可证详细信息。它是只读的。

要使用 Get-MgUserLicenseDetail cmdlet,必须首先使用 Connect-MGraph cmdlet 连接到 Microsoft 365 租户。连接后,您可以使用 Get-MgUserLicenseDetail cmdlet 获取分配给用户的许可证集合。

Connect-MgGraph -Scopes 'User.Read.All'

下面给出了获取用户许可证详细信息的语法。

Get-MgUserLicenseDetail
   -UserId <String>
   -LicenseDetailsId <String>
   [-ExpandProperty <String[]>]
   [-Property <String[]>]
   [-Filter <String>]
   [-Search <String>]
   [-Skip <Int32>]
   [-Sort <String[]>]
   [-Top <Int32>]
   [-PageSize <Int32>]
   [-All]
   [-CountVariable <String>]
   [<CommonParameters>]

在本文中,我们将讨论如何在 PowerShell 中使用 Get-MgUserLicenseDetail cmdlet 来获取用户的许可证详细信息。

如何获取用户的许可证详细信息

要获取用户的许可证详细信息,请运行以下命令。

 Get-MgUserLicenseDetail -UserId 'cf634aac-d7d1-41a4-aad9-544c0bfda070' 

PowerShell 中的 Get-MgUserLicenseDetail cmdlet 使用 -UserId 参数指定用户检索分配给他的许可证集合。

[玩转系统] Get-MgUserLicenseDetail - 查看用户的许可详细信息

Get-MgUserLicenseDetail 命令的输出包括以下属性。

  • Id:许可证详细信息的唯一标识符
  • SkuId:Sku ID
  • SkuPartNumber:Sku 部件号。

结论

希望上述有关如何在 PowerShell 中使用 Get-MgUserLicenseDetail cmdlet 获取用户许可证详细信息的文章对您有所帮助。

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

相关链接

获取 MgUserDirectReport

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

取消回复欢迎 发表评论:

关灯