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

[玩转系统] 获取 MsolServicePrincipalCredential

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

获取 MsolServicePrincipalCredential


PowerShell 中的 Get-MsolServicePrincipalCredential cmdlet 获取与 Microsoft Office 365 中的服务主体关联的凭据。

下面给出了获取服务主体的凭证属性的语法。

Get-MsolServicePrincipalCredential
   -ObjectId <Guid>
   -AppPrincipalId <Guid>
   -ReturnKeyValues <Boolean>
    -ServicePrincipalName <String>
   [-TenantId <Guid>]
   [<CommonParameters>]

在本文中,我们将讨论如何在 PowerShell 中使用 Get-MsolServicePrincipalCredential cmdlet 获取 Azure Active Directory 中服务主体的凭据属性。

如何获取服务主体的凭证属性

若要获取 Office 365 中服务主体的凭据属性,请使用 Get-MsolServicePrincipalCredential cmdlet 以及 -ServicePrincipalName-ReturnKeyValues 参数。

-ServicePrincipalName 参数指定从中获取凭据的服务主体的名称。 -ReturnKeyValues 参数指示此命令是否返回键值。

Get-MsolServicePrincipalCredential -ServicePrincipalName "ShellGeek/ShellApp.com" -ReturnKeyValues $true

此命令获取与服务主体名称“ShellGeek/ShellApp.com”关联的所有凭据属性。

注意:此命令不会返回服务主体的凭据值。

[玩转系统] 获取 MsolServicePrincipalCredential

结论

我希望上述有关如何在 PowerShell 中使用 Get-MsolServicePrincipalCredential cmdlet 获取服务主体凭据的文章对您有所帮助。

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

相关链接

新-MsolServicePrincipalCredential

删除 MsolServicePrincipalCredential

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

取消回复欢迎 发表评论:

关灯