Get-VMTPM
Get-VMTPM
Gets the TPM configuration for virtual machines.
Syntax
Parameter Set: VMName
Get-VMTPM [-VMName] <String[]> [-CimSession <CimSession[]> ] [-ComputerName <String[]> ] [-Credential <PSCredential[]> ] [ <CommonParameters>]
Parameter Set: VMObject
Get-VMTPM [-VM] <VirtualMachine[]> [ <CommonParameters>]
Parameter Set: VMSnapshot
Get-VMTPM [-VMSnapshot] <VMSnapshot> [ <CommonParameters>]
Detailed Description
The Get-VMTPM cmdlet gets the configuration of the virtual Trusted Platform Module (TPM) for virtual machines.
Parameters
-CimSession<CimSession[]>
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ComputerName<String[]>
Specifies one or more Hyper-V hosts that run this cmdlet. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<PSCredential[]>
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VM<VirtualMachine[]>
Specifies an array of virtual machine objects for which this cmdlet gets the TPM settings. To obtain a virtual machine object, use the Get-VM cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
-VMName<String[]>
Specifies an array of virtual machine names for which this cmdlet gets the TPM settings.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
-VMSnapshot<VMSnapshot>
Specifies a virtual machine checkpoint. This cmdlet gets the TPM configuration for the checkpoint of a virtual machine that this parameter specifies.
Checkpoint replaces the previous term, snapshot.
Aliases |
VMCheckpoint |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.HyperV.Powershell.VMTPM
Examples
Example 1: Get a TPM by virtual machine name
This command gets the virtual TPM object for the virtual machine named VM01.
PS C:\> Get-VMTPM -VMName "VM01"