Remove-EntraServicePrincipalOwner
サービス プリンシパルから所有者を削除します。
構文
Default (既定)
Remove-EntraServicePrincipalOwner
-OwnerId <String>
-ServicePrincipalId <String>
[<CommonParameters>]
説明
Remove-EntraServicePrincipalOwner コマンドレットは、Microsoft Entra IDのサービス プリンシパルから所有者を削除します。
例
例 1: サービス プリンシパルから所有者を削除する
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
この例では、Microsoft Entra IDでサービス プリンシパルから所有者を削除する方法を示します。
-
-ServicePrincipalIdパラメーターは、サービス プリンシパル ID を指定します。 -
-OwnerIdパラメーターは、サービス プリンシパルの所有者 ID を指定します。
パラメーター
-OwnerId
所有者の ID を指定します。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | True |
| 残りの引数からの値: | False |
-ServicePrincipalId
サービス プリンシパルの ID を指定します。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
| Aliases: | オブジェクト識別子 |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | True |
| 残りの引数からの値: | False |
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。