Get-AzureADServicePrincipalPasswordCredential

Obtenir des informations d’identification pour un principal de service.

Syntax

Get-AzureADServicePrincipalPasswordCredential
   -ObjectId <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

L’applet de commande Get-AzureADServicePrincipalPasswordCredential obtient les informations d’identification de mot de passe d’un principal de service dans Azure Active Directory (AD).

Exemples

Exemple 1 : Récupérer les informations d’identification de mot de passe d’un principal de service

PS C:\> $ServicePrincipalId = (Get-AzureADServicePrincipal -Top 1).ObjectId
PS C:\> Get-AzureADServicePrincipalPasswordCredential -ObjectId $ServicePrincipalId

La première commande obtient l’ID d’un principal de service à l’aide de l’applet de commande Get-AzureADServicePrincipal (./Get-AzureADServicePrincipal.md). La commande stocke l’ID dans la variable $ServicePrincipalId.

La deuxième commande obtient les informations d’identification de mot de passe d’un principal de service identifié par $ServicePrincipalId.

Paramètres

-InformationAction

Spécifie la façon dont cette applet de commande répond à un événement d’informations. Les valeurs valides pour ce paramètre sont :

  • Continuer
  • Ignorer
  • Inquire
  • SilentlyContinue
  • Arrêter
  • Interrompre
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Spécifie une variable d’informations.

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

-ObjectId

Spécifie l’ID du principal de service pour lequel obtenir les informations d’identification du mot de passe.

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