PowerCLI Reference

New-VTpm

Synopsis

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

Syntax

New-VTpm [-VM] <VirtualMachine> [-Confirm] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]

Related Commands

Get-VTpm
Remove-VTpm
Set-VTpm
Get-VTpmCertificate
Get-VTpmCSR

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMVirtualMachineSpecifies the virtual machine that you want to add the VTpm device.trueTrue (ByValue)
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
RunAsyncSwitchParameterIndicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.falseFalse
ServerVIServer[]Specifies the connected viserver on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default viservers. For more information about default viservers, see the description of the Connect-VIServer cmdlet.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

Works only on vCenter Server system versions 6.7 or later and ESX versions 6.7 or later. If the given virtual machine wasn't encrypted with its VM Home, then the default kmscluster is required to be place in vCenter Server; As a result of the cmdlet, the VM Home of the given virtual machine will be encrypted.

Examples

-------------------------- Example 1 --------------------------

Get-VM MyVM | New-VTpm

Adds a new VTpm device to the virtual machine named "MyVM".


Copyright © VMware, Inc. All rights reserved.