Set-VTpm Command | Vmware PowerCLI Reference

Set-VTpm

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 an X509Certificate2 object or in a file.

Syntax

Set-VTpm
[ -CertFilePath ] < String >
-VTpm < VTpm >
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
CertFilePath String 1
Specifies the certificate file where the certificate string that you want to set to the specified vTPM device resides.
required
VTpm VTpm named
  • pipeline
Specifies the vTPM device that you want to configure.
optional ProgressAction ActionPreference named
Set-VTpm
[ -Certificate ] < X509Certificate2 >
-VTpm < VTpm >
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Certificate X509Certificate2 1
Specifies the certificate object that you want to set to the specified vTPM device.
required
VTpm VTpm named
  • pipeline
Specifies the vTPM device that you want to configure.
optional ProgressAction ActionPreference named

Output

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

Examples

Example 1

Get-VTpm -VM 'MyVM' | Set-VTpm -CertFilePath 'C:\MyCertFile.cert'

Changes the certificate of the vTPM device in a virtual machine named 'MyVM' with the new certificate in the 'C:\MyCertFile.cert' file.

Related Commands

VTpm

This cmdlet retrieves the virtual TPM (vTPM) devices available on the given virtual machines.

This cmdlet creates a new vTPM device on the specified virtual machine.

This cmdlet removes the specified vTPM devices.

This cmdlet modifies the properties of the specified vTPM device.

VTpmCSR

This cmdlet retrieves the certficate signing requests (CSR) from the given vTPM devices.

VTpmCertificate

This cmdlet retrieves the certificate information from the given vTPM devices.