Set-​Azure​Key​Vault​Certificate​Attribute

Modifies editable attributes of a certificate.

Syntax

Set-AzureKeyVaultCertificateAttribute
   [-VaultName] <String>
   [-Name] <String>
   [[-Version] <String>]
   [-Confirm]
   [-Enable <Boolean>]
   [-PassThru]
   [-Tag <Hashtable>]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureKeyVaultCertificateAttribute cmdlet modifies the editable attributes of a certificate.

Examples

Example 1: Modify the tags associated with a certificate

PS C:\>$Tags = @{ "Team" = "Azure" ; "Role" = "Engg" }
PS C:\> Set-AzureKeyVaultCertificateAttribute -VaultName "ContosoKV01" -Name "TestCert01" -Tags $Tags
PS C:\> Get-AzureKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01" 
Name        : "TestCert01"
Certificate : [Subject] 
                CN=AZURE

              [Issuer] 
                CN=AZURE

              [Serial Number] 
                5A2EF60501F241D6A4336841B36FEA41

              [Not Before] 
                7/27/2016 6:50:01 PM

              [Not After] 
                7/27/2018 7:00:01 PM

              [Thumbprint] 
                A565D568082FEE2BE33B356ECC3703C2E9886555

Id          : https://ContosoKV01.vault.azure.net:443/certificates/tt02
KeyId       : https://ContosoKV01.vault.azure.net:443/keys/tt02
SecretId    : https://ContosoKV01.vault.azure.net:443/secrets/tt02
Thumbprint  : A565D568082FEE2BE33B356ECC3703C2E9886555
Tags        : {[Role, Engg], [Team, Azure]} 
Enabled     : True
Created     : 7/28/2016 2:00:01 AM
Updated     : 8/1/2016 5:37:48 PM

The first command assigns an array of key/value pairs to the $Tags variable.

The second command sets the tags value of the certificate named TestCert01 to be $Tags.

The final command displays the TestCert01 certificate by using the Get-AzureKeyVaultCertificate cmdlet to verify the operation.

Required Parameters

-Name

Specifies the name of the certificate to modify. This cmdlet constructs the FQDN of a certificate based on the key vault name, your currently selected environment, the certificate name, and the certificate version.

Type:String
Aliases:CertificateName
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VaultName

Specifies the key vault name in which this cmdlet modifies a certificate. This cmdlet constructs the FQDN of a key vault based on the name and currently selected environment.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Indicates whether to enable or disable a certificate. Specify $True to enable or $False to disable.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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

Specifies a hash table that contains certificate tags. If not specified, the existing tags of the sertificate remain unchanged. Remove a tag by specifying an empty Hashtable.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Version

Specifies the version of a certificate. This cmdlet constructs the FQDN of a certificate based on the key vault name, your currently selected environment, the certificate name, and the certificate version.

Type:String
Aliases:CertificateVersion
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False