Remove-EntraServicePrincipalOwner

Rimuove un proprietario da un'entità servizio.

Sintassi

Default (Impostazione predefinita)

Remove-EntraServicePrincipalOwner

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

Descrizione

Il Remove-EntraServicePrincipalOwner cmdlet rimuove un proprietario da un'entità servizio in Microsoft Entra ID.

Esempio

Esempio 1: Rimuove un proprietario da un'entità servizio

Connect-Entra -Scopes 'Application.ReadWrite.All'
$servicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'Helpdesk Application'"
$ownership = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.Id | Select-Object Id, userPrincipalName, DisplayName, '@odata.type'
$owner = $ownership | Where-Object {$_.userPrincipalName -eq 'SawyerM@Contoso.com' }
Remove-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.Id -OwnerId $owner.Id

Questo esempio illustra come rimuovere un proprietario da un'entità servizio in Microsoft Entra ID.

  • -ServicePrincipalId parametro specifica l'ID entità servizio.
  • -OwnerId parametro specifica l'ID proprietario dell'entità servizio.

Parametri

-OwnerId

Specifica l'ID del proprietario.

Proprietà dei parametri

Tipo:System.String
Valore predefinito:None
Supporta i caratteri jolly:False
DontShow:False

Set di parametri

(All)
Posizione:Named
Obbligatorio:True
Valore dalla pipeline:True
Valore dalla pipeline in base al nome della proprietà:True
Valore dagli argomenti rimanenti:False

-ServicePrincipalId

Specifica l'ID di un'entità servizio.

Proprietà dei parametri

Tipo:System.String
Valore predefinito:None
Supporta i caratteri jolly:False
DontShow:False
Alias:ObjectId

Set di parametri

(All)
Posizione:Named
Obbligatorio:True
Valore dalla pipeline:True
Valore dalla pipeline in base al nome della proprietà:True
Valore dagli argomenti rimanenti:False

CommonParameters

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Per altre informazioni, vedi about_CommonParameters.