Use the command wmic
to get the TPM status in cmd. It uses Win32_tpm class to query the /namespace parameter for the TPM \\root\cimv2\Security\MicrosoftTpm
and retrieves all the properties of the TPM, like tpm status, activated, enabled, etc…
wmic utility command in cmd gets information about TPM ( Trusted Platform Module) on the current computer.
This article will discuss how to get TPM status in cmd and other TPM properties.
Get TPM Status using Command Prompt
Use the wmic command-line tool to query the namespace \\root\cimv2\security\microsofttpm to retrieve the TPM status whether it is enabled or not. If the TPM is enabled, it will return True, else return False.
wmic /namespace:\\root\cimv2\security\microsofttpm path Win32_Tpm get IsEnabled_InitialValue
The above command gets the TPM status using the IsEnabled_InititalValue property.
The output of the above command is:
C:\WINDOWS\system32>wmic /namespace:\\root\cimv2\security\microsofttpm path Win32_Tpm get IsEnabled_InitialValue
IsEnabled_InitialValue
TRUE
Cool Tip: How to run PowerShell script from cmd!
Get TPM Information using Cmd
To get all properties of the TPM using the command line (cmd), use the following command.
wmic /namespace:\\root\cimv2\Security\MicrosoftTpm path Win32_Tpm get /value
This wmic
command in cmd displays all Tpm information of the current computer.
IsEnabled_InitialValue=TRUE
IsActivated_InitialValue=TRUE
IsOwned_InitialValue=TRUE
ManufacturerId=1214243042
ManufacturerIdTxt=NTC
ManufacturerVersion=7.2.0.2
ManufacturerVersionFull20=7.2.0.2
SpecVersion=2.0, 0, 1.16
SpecVersion property displays the TPM version on the current computer which is 2.0
If you are using PowerShell, use the Get-TPM cmdlet in PowerShell to get information about TPM.
Conclusion
I hope the above article on getting tpm status in cmd using the wmic command-line tool is helpful.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.