Remove-EntraServicePrincipalOwner
Supprime un propriétaire d’un principal de service.
Syntaxe
Default (Par défaut)
Remove-EntraServicePrincipalOwner
-OwnerId <String>
-ServicePrincipalId <String>
[<CommonParameters>]
Description
L’applet Remove-EntraServicePrincipalOwner de commande supprime un propriétaire d’un principal de service dans Microsoft Entra ID.
Exemples
Exemple 1 : Supprime un propriétaire d’un principal de service
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
Cet exemple montre comment supprimer un propriétaire d’un principal de service dans Microsoft Entra ID.
-
-ServicePrincipalIdspécifie l’ID du principal de service. -
-OwnerIdspécifie l’ID du propriétaire du principal de service.
Paramètres
-OwnerId
Spécifie l’ID du propriétaire.
Propriétés du paramètre
| Type: | System.String |
| Valeur par défaut: | None |
| Prend en charge les caractères génériques: | False |
| DontShow: | False |
Jeux de paramètres
(All)
| Position: | Named |
| Obligatoire: | True |
| Valeur du pipeline: | True |
| Valeur du pipeline par nom de propriété: | True |
| Valeur des arguments restants: | False |
-ServicePrincipalId
Spécifie l’ID d’un principal de service.
Propriétés du paramètre
| Type: | System.String |
| Valeur par défaut: | None |
| Prend en charge les caractères génériques: | False |
| DontShow: | False |
| Alias: | Identifiant d'objet (ObjectId) |
Jeux de paramètres
(All)
| Position: | Named |
| Obligatoire: | True |
| Valeur du pipeline: | True |
| Valeur du pipeline par nom de propriété: | True |
| Valeur des arguments restants: | False |
CommonParameters
Cette applet de commande prend en charge les paramètres courants : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction et -WarningVariable. Pour plus d’informations, consultez about_CommonParameters.