PowerCLI Reference

Set-VTpm

Synopsis

This cmdlet modifies the properties of the specified VTpm device.

Syntax

Set-VTpm [-VTpm] <VTpm> [-CertFilePath] <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Set-VTpm [-VTpm] <VTpm> [-Certificate] <X509Certificate2> [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Get-VTpm
New-VTpm
Remove-VTpm
Get-VTpmCertificate
Get-VTpmCSR

Detailed 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

NameTypeDescriptionRequired?Pipeline InputDefault Value
VTpmVTpmSpecifies the VTpm device that you want to configure.trueTrue (ByValue)
CertFilePathStringSpecifies the certificate file in which stores the certificate string that you want to set to the specified VTpm device.trueFalse
CertificateX509Certificate2Specifies the certificate object that you want to set to the specified VTpm device.trueFalse
ConfirmSwitchParameterIf 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.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

VMware.VimAutomation.Security.Types.V1.Entity.VTpm

Notes

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'.


Copyright © VMware, Inc. All rights reserved.