Remove-EntraServicePrincipalPasswordCredential

Entfernt eine Kennwortanmeldeinformationen aus einem Dienstprinzipal.

Syntax

Default (Standard)

Remove-EntraServicePrincipalPasswordCredential

    -ServicePrincipalId <String>
    -KeyId <String>
    [<CommonParameters>]

Beschreibung

Das Remove-EntraServicePrincipalPasswordCredential Cmdlet entfernt eine Kennwortanmeldeinformation aus einem Dienstprinzipal in Microsoft Entra ID.

Beispiele

Beispiel 1: Entfernen einer Kennwortanmeldeinformationen aus einem Dienstprinzipal in Microsoft Entra ID

Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$servicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'Helpdesk Application'"
$key = Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $servicePrincipal.Id
$key = $key | Where-Object {$_.DisplayName -eq 'Helpdesk secret'}
Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId $servicePrincipal.Id -KeyId $key.KeyId

In diesem Beispiel wird veranschaulicht, wie Sie eine Kennwortanmeldeinformationen aus einem Dienstprinzipal in Microsoft Entra ID entfernen.

  • -ServicePrincipalId parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential.
  • -KeyId der Parameter gibt den eindeutigen Bezeichner einer Kennwortanmeldeinformationen an.

Parameter

-KeyId

Gibt den eindeutigen Bezeichner der Kennwortanmeldeinformationen an.

Parametereigenschaften

Typ:System.String
Standardwert:None
Unterstützt Platzhalter:False
Nicht anzeigen:False

Parametersätze

(All)
Position:Named
Obligatorisch:True
Wert aus Pipeline:True
Wert aus Pipeline nach dem Eigenschaftsnamen:True
Wert aus verbleibenden Argumenten:False

-ServicePrincipalId

Gibt die ID einer Anwendung in Microsoft Entra ID an.

Parametereigenschaften

Typ:System.String
Standardwert:None
Unterstützt Platzhalter:False
Nicht anzeigen:False
Aliase:Objekt-ID

Parametersätze

(All)
Position:Named
Obligatorisch:True
Wert aus Pipeline:True
Wert aus Pipeline nach dem Eigenschaftsnamen:True
Wert aus verbleibenden Argumenten:False

CommonParameters

Dieses Cmdlet unterstützt die allgemeinen Parameter -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction und -WarningVariable. Weitere Informationen findest du unter about_CommonParameters.