你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzureRmADAppCredential

检索与应用程序关联的凭据列表。

警告

截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。

尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源

语法

Get-AzureRmADAppCredential
   -ObjectId <Guid>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADAppCredential
   -ApplicationId <Guid>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADAppCredential
   -DisplayName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADAppCredential
   -ApplicationObject <PSADApplication>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

说明

Get-AzureRmADAppCredential cmdlet 可用于检索与应用程序关联的凭据列表。 此命令将检索与应用程序关联的所有凭据属性(但不检索凭据值)。

示例

示例 1 - 按对象 ID 获取应用程序凭据

PS C:\> Get-AzureRmADAppCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476

返回与具有对象 ID 为“1f99cf81-0146-4f4e-beae-2007d0668476”的应用程序关联的凭据列表。

示例 2 - 通过管道获取应用程序凭据

PS C:\> Get-AzureRmADApplication -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 | Get-AzureRmADAppCredential

获取对象 ID 为“1f99cf81-0146-4f4e-beae-2007d0668476”的应用程序,并将其传递给 Get-AzureRmADAppCredential cmdlet 以列出该应用程序的所有凭据。

参数

-ApplicationId

要从中检索凭据的应用程序的 ID。

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ApplicationObject

要从中检索凭据的应用程序对象。

Type:PSADApplication
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

用于与 azure 通信的凭据、帐户、租户和订阅

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

应用程序的显示名称。

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ObjectId

要从中检索凭据的应用程序的对象 ID。

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

输入

Guid

String

PSADApplication

参数:ApplicationObject (ByValue)

输出

PSADCredential