Remove-EntraUser

ユーザーを削除します。

構文

Default (既定)

Remove-EntraUser

    -UserId <String>
    [<CommonParameters>]

説明

Remove-EntraUser コマンドレットは、Microsoft Entra ID内のユーザーを削除します。 Microsoft Entra IDで指定したユーザーを削除するには、UserId パラメーターを指定します。

呼び出し元のユーザーには、次のMicrosoft Entraロールの少なくとも 1 つを割り当てる必要があります。

  • ユーザー管理者
  • 特権認証管理者

例 1: ユーザーを削除する

Connect-Entra -Scopes 'User.ReadWrite.All'
Remove-EntraUser -UserId 'SawyerM@Contoso.com'

このコマンドは、Microsoft Entra IDで指定されたユーザーを削除します。

例 2: 検索結果に基づいてユーザーを削除する

Connect-Entra -Scopes 'User.ReadWrite.All'
Get-EntraUser -UserId 'SawyerM@Contoso.com' | Remove-EntraUser

このコマンドは、Microsoft Entra IDで指定されたユーザーを削除します。

パラメーター

-UserId

Microsoft Entra IDのユーザーの ID (UPN または UserId) を指定します。

パラメーターのプロパティ

型:System.String
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:オブジェクト識別子, UPN, アイデンティティ, ユーザープリンシパルネーム

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

CommonParameters

このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。