# 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
VM | VirtualMachine | Specifies the virtual machine that you want to add the VTpm device. | true | True (ByValue)
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
RunAsync | SwitchParameter | Indicates 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. | false | False
Server | VIServer[] | 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. | 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.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.