Edit

Share via


Set-DHASActiveEncryptionCertificate

Sets the active encryption certificate.

Syntax

Default (Default)

Set-DHASActiveEncryptionCertificate
    [-Thumbprint] <String>
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-DHASActiveEncryptionCertificate cmdlet sets the active encryption certificate for the Device Health Attestation service.

You must have administrator rights to run this cmdlet.

Examples

Example 1: Set the encryption certificate

PS C:\> Set-DHASActiveEncryptionCertificate -Thumbprint "0123456789ABCDEF0123456789ABCDEF01234567"

This command sets the active encryption certificate for the Device Health Attestation service.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Thumbprint

Specifies the encryption certificate thumbprint. The value must contain only hexadecimal digits (0-9, A-F) and be 40 characters in length. This value is case-insensitive.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

The input type is a String for the active encryption certificate thumbprint.