Remove-AzKeyVaultRoleAssignment
拿掉指派給指定主體的角色指派給特定範圍中的特定角色。
語法
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionName <String>
-SignInName <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionName <String>
-ApplicationId <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionName <String>
-ObjectId <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionId <String>
-ApplicationId <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionId <String>
-ObjectId <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
-RoleDefinitionId <String>
-SignInName <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-HsmName] <String>
[-Scope <String>]
[-PassThru]
-RoleAssignmentName <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzKeyVaultRoleAssignment
[-Scope <String>]
[-PassThru]
-InputObject <PSKeyVaultRoleAssignment>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
使用 Remove-AzKeyVaultRoleAssignment
Cmdlet 撤銷指定範圍和指定角色上任何主體的存取權。 指派的物件,亦即必須指定主體。 主體可以是使用者(使用 SignInName 或 ObjectId 參數來識別使用者)、安全組(使用 ObjectId 參數來識別群組)或服務主體(使用 ApplicationId 或 ObjectId 參數來識別 ServicePrincipal。 使用 RoleDefinitionName 或 RoleDefinitionId 參數指定主體指派給 MUST 的角色。
Cmdlet 可能會根據輸入參數呼叫下列Microsoft圖形 API:
- GET /users/{id}
- GET /servicePrincipals
範例
範例 1
Remove-AzKeyVaultRoleAssignment -HsmName myHsm -RoleDefinitionName "Managed HSM Policy Administrator" -SignInName user1@microsoft.com -Scope "/keys"
此範例會撤銷 「/keys」 範圍中 「user1@microsoft.com」 的「受控 HSM 原則管理員」角色。
範例 2
Get-AzKeyVaultRoleAssignment -HsmName myHsm -SignInName user1@microsoft.com | Remove-AzKeyVaultRoleAssignment
此範例會撤銷所有範圍中 「user1@microsoft.com」 的所有角色。
參數
-ApplicationId
應用程式SPN。
類型: | String |
別名: | SPN, ServicePrincipalName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-HsmName
HSM 的名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
角色指派物件。
類型: | PSKeyVaultRoleAssignment |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ObjectId
使用者或群組物件標識碼。
類型: | String |
別名: | Id, PrincipalId |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PassThru
還原 HSM 時傳回 true。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-RoleAssignmentName
角色指派的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-RoleDefinitionId
指派主體的角色標識碼。
類型: | String |
別名: | RoleId |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-RoleDefinitionName
要為其指派主體的 RBAC 角色名稱。
類型: | String |
別名: | RoleName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Scope
角色指派或定義套用至的範圍,例如 '/' 或 '/keys' 或 '/keys/{keyName}'。 省略時會使用 『/』。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SignInName
使用者 SignInName。
類型: | String |
別名: | Email, UserPrincipalName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |