Dela via


Get-AzureADServicePrincipalPasswordCredential

Hämta autentiseringsuppgifter för tjänstens huvudnamn.

Syntax

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

Description

Cmdleten Get-AzureADServicePrincipalPasswordCredential hämtar lösenordsautentiseringsuppgifterna för tjänstens huvudnamn i Azure Active Directory (AD).

Exempel

Exempel 1: Hämta lösenordsautentiseringsuppgifterna för ett tjänsthuvudnamn

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

Det första kommandot hämtar ID:t för ett huvudnamn för tjänsten med hjälp av cmdleten Get-AzureADServicePrincipal . Kommandot lagrar ID:t i variabeln $ServicePrincipalId.

Det andra kommandot hämtar lösenordsautentiseringsuppgifterna för ett tjänsthuvudnamn som identifieras av $ServicePrincipalId.

Parametrar

-InformationAction

Anger hur den här cmdleten svarar på en informationshändelse. De acceptabla värdena för den här parametern är:

  • Fortsätt
  • Ignorera
  • Fråga
  • SilentlyContinue
  • Stoppa
  • Suspend
Typ:ActionPreference
Alias:infa
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InformationVariable

Anger en informationsvariabel.

Typ:String
Alias:iv
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ObjectId

Anger ID:t för tjänstens huvudnamn som du vill hämta lösenordsautentiseringsuppgifter för.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False