Remove-AzApiManagementUser
刪除現有的使用者。
語法
Remove-AzApiManagementUser
-Context <PsApiManagementContext>
-UserId <String>
[-DeleteSubscriptions]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Remove-AzApiManagementUser Cmdlet 會刪除現有的使用者。
範例
範例 1:刪除使用者
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Remove-AzApiManagementUser -Context $apimContext -UserId "0123456789"
此命令會刪除現有的使用者。
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Context
指定 PsApiManagementContext 物件。 這是必要參數。
類型: | PsApiManagementContext |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DeleteSubscriptions
指出是否要刪除產品的訂閱。 如果未指定此參數,而且訂用帳戶存在,這個 Cmdlet 會擲回例外狀況。 這個參數是選擇性的。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-PassThru
表示這個 Cmdlet 會傳回 $Ture 的值,如果成功,則傳回 $False 的值,否則傳回 。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-UserId
指定要移除的使用者識別碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |