Syntax
Set-VTpm [-VTpm] <VTpm> [-CertFilePath] <String> [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Get-VTpmDetailed Description
This cmdlet modifies the properties of the specified VTpm device. You can change the certificate of the specified VTpm device by specifying the new certificate in a X509Certificate2 object or in a file.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
VTpm | VTpm | Specifies the VTpm device that you want to configure. | true | True (ByValue) | |
CertFilePath | String | Specifies the certificate file in which stores the certificate string that you want to set to the specified VTpm device. | true | False | |
Certificate | X509Certificate2 | Specifies the certificate object that you want to set to the specified VTpm device. | true | False | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
VMware.VimAutomation.Security.Types.V1.Entity.VTpmNotes
The public key of the certificate should match the one in the certificate signing requests of the given VTpm device.Examples
-------------------------- Example 1 --------------------------
Get-VTpm -VM 'MyVM' | Set-VTpm -CertFilePath 'C:\MyCertFile.cert'
Changes the certificate of the VTpm device in virtual machine named 'MyVM' with the new certificate in file 'C:\MyCertFile.cert'.