Update-AzKeyVaultSetting

Update specific setting associated with the managed HSM.

Syntax

Update-AzKeyVaultSetting
      [-HsmName] <String>
      [-Name] <String>
      [-Value] <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzKeyVaultSetting
      [[-HsmName] <String>]
      [[-Value] <String>]
      [-InputObject] <PSKeyVaultSetting>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzKeyVaultSetting
      [-Name] <String>
      [-Value] <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-HsmObject] <PSManagedHsm>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzKeyVaultSetting
      [-Name] <String>
      [-Value] <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-HsmId] <String>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-AzKeyVaultSetting cmdlet updates key vault account settings. This cmdlet updates a specific key vault account setting.

Examples

Example 1: Update a specific key vault account setting

Update-AzKeyVaultSetting -HsmName testmhsm -Name AllowKeyManagementOperationsThroughARM -Value true -PassThru

Name                                   Value Type    HSM Name
----                                   ----- ----    --------
AllowKeyManagementOperationsThroughARM true  boolean testmhsm

Update a specific key vault account setting named AllowKeyManagementOperationsThroughARM in a Managed Hsm named testmhsm.

Example 2: Update a specific key vault account setting same as another account setting

$setting = Get-AzKeyVaultSetting -HsmName testmhsm1 -Name AllowKeyManagementOperationsThroughARM
$setting | Update-AzKeyVaultSetting -HsmName testmhsm2 -PassThru

Name                                   Value Type    HSM Name
----                                   ----- ----    --------
AllowKeyManagementOperationsThroughARM true  boolean testmhsm2

Update a specific key vault account setting named AllowKeyManagementOperationsThroughARM in a Managed Hsm named testmhsm2 same with testmhsm1.

Example 3: Update a specific key vault account setting via HsmObject

$hsmObject = Get-AzKeyVaultManagedHsm -Name testmhsm
Update-AzKeyVaultSetting -HsmObject $hsmObject -Name AllowKeyManagementOperationsThroughARM -Value true -PassThru

Name                                   Value Type    HSM Name
----                                   ----- ----    --------
AllowKeyManagementOperationsThroughARM true  boolean testmhsm

Update a specific key vault account setting named AllowKeyManagementOperationsThroughARM in a Managed Hsm named testmhsm via HsmObject.

Example 4: Update a specific key vault account setting via HsmId

$hsmObject = Get-AzKeyVaultManagedHsm -Name testmhsm
Update-AzKeyVaultSetting -HsmId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.KeyVault/managedHSMs/testmhsm-Name AllowKeyManagementOperationsThroughARM -Value true -PassThru

Name                                   Value Type    HSM Name
----                                   ----- ----    --------
AllowKeyManagementOperationsThroughARM true  boolean testmhsm

Update a specific key vault account setting named AllowKeyManagementOperationsThroughARM in a Managed Hsm named testmhsm via HsmObject.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HsmId

Hsm Resource Id.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HsmName

Name of the HSM.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HsmObject

Hsm Object.

Type:PSManagedHsm
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InputObject

The location of the deleted vault.

Type:PSKeyVaultSetting
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Name of the setting.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Cmdlet does not return object by default. If this switch is specified, return Secret object.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Value

Value of the setting.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSKeyVaultSetting

PSManagedHsm

Outputs

PSKeyVaultSetting