Remove-AzADUser
語法
UPNOrObjectIdParameterSet (預設值)
Remove-AzADUser
-UPNOrObjectId <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ObjectIdParameterSet
Remove-AzADUser
-ObjectId <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UPNParameterSet
Remove-AzADUser
-UserPrincipalName <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DisplayNameParameterSet
Remove-AzADUser
-DisplayName <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzADUser
-InputObject <IMicrosoftGraphUser>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
範例
範例 1:依顯示名稱移除使用者
Remove-AzADUser -DisplayName $name
依顯示名稱移除使用者
範例 2:依管線輸入移除使用者
Get-AzADUser -UserPrincipalName $id | Remove-AzADUser
依管線輸入移除使用者
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
| 類型: | PSObject
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | AzContext, AzureRmContext, AzureCredential |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-DisplayName
使用者顯示名稱
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
DisplayNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
使用者輸入物件
InputObjectParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ObjectId
key:使用者的ID
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-PassThru
當命令成功時傳回 true
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-UPNOrObjectId
要刪除之使用者的 userPrincipalName 或 ObjectId。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
UPNOrObjectIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-UserPrincipalName
使用者主體名稱
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | UPN |
參數集
UPNParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。
指令未執行。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出