Post problem reports here for Batch files for use in BSOD debugging


  1. Posts : 39,157
    windows 10 professional version 1607 build 14393.969 64 bit
       #1011

    That's much shorter than the results with get-tpm or powershell get-tpm.

    Thx.

    If possible please post the command so that Matthew Wai can use it in modifying V2.
      My Computer

  2. jbcarreon123's Avatar
    Posts : 1,638
    Windows 10 Pro v21H1 x64 (19043.1052), Linux (LiveUSB)
       #1012

    zbook said:
    That's much shorter than the results with get-tpm or powershell get-tpm.

    Thx.

    If possible please post the command so that Matthew Wai can use it in modifying V2.
    It's too long and only works with CMD.

    Code:
    @echo off
    :: -----------------------------------
    ::             TPMChecker
    ::   Based on Win11Compchk TPM Check
    :: -----------------------------------
    (Fsutil Dirty Query %SystemDrive%>Nul)||(PowerShell start-process -filepath """%~fn0""" -argumentlist """%1 %2 %3""" -verb RunAs & Exit /B)
    echo Log Collection... (V1.6.3)
    echo Getting TPM Status...
    echo.
    
    ::TPM
    Powershell get-wmiobject -class Win32_Tpm -namespace root\CIMV2\Security\MicrosoftTpm ^| select -ExpandProperty IsActivated_InitialValue >%temp%\tpm1.log 2>&1
    Powershell get-wmiobject -class Win32_Tpm -namespace root\CIMV2\Security\MicrosoftTpm ^| select -ExpandProperty IsEnabled_InitialValue >%temp%\tpm2.log 2>&1
    
    set /p "tpm1=" <%temp%\tpm1.log
    set /p "tpm2=" <%temp%\tpm2.log
    
    If not "%tpm1%"=="True" (
    set "tpm1=False"
    )
    
    if "%tpm2%"=="True" (
    set /a "sc+=1"
    ) else (
    set "tpm2=False"
    )
    ::TPM Version
    wmic /namespace:\\root\cimv2\security\microsofttpm path win32_tpm get * /format:textvaluelist.xsl | findstr /c:"PhysicalPresenceVersionInfo" >%temp%\tpmv.log 2>nul
    powershell ^(get-content "%temp%\tpmv.log"^) -replace 'PhysicalPresenceVersionInfo','' ^|  Out-File %temp%\tpmv2.log
    powershell ^(get-content "%temp%\tpmv2.log"^) -replace ':','' ^|  Out-File %temp%\tpmv3.log
    powershell ^(get-content "%temp%\tpmv3.log"^) -replace ' ','' ^|  Out-File %temp%\tpmv4.log
    powershell ^(get-content "%temp%\tpmv4.log"^) -replace '=','' ^|  Out-File %temp%\tpmv5.log
    type %temp%\tpmv5.log > %temp%\tpmv6.log
    set /p "tpmv=" <%temp%\tpmv6.log
    
    
    if "%tpmv%"=="" ( set "tpmver=False")
    if not "%tpmver%"=="False" (
    if "%tpmv%"=="1.3" ( set /a "sc+=1" && set "tpmver=2.0") else ( set "tpmver=%tpmv%")
    )
    )
    
    echo TPMActive     : %tpm1%
    echo TPMEnabled    : %tpm2%
    echo TPMVersion    : %tpmver%
    echo.
    echo Press any key to exit.
    pause >nul
      My Computers

  3. Paul Black's Avatar
    Posts : 15,106
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1013

    Hello @jbcarreon123,

    jbcarreon123 said:
    It's too long and only works with CMD.
    May I suggest adding the following code just BEFORE the echo Press any key to exit. . . .

    Code:
    
    del "%temp%\tpm*.log" >nul 2>&1

      My Computer

  4. Matthew Wai's Avatar
    Posts : 6,441
    Windows 10 Home 20H2
       #1014

    zbook said:
    Which command was used for hibernation?

    (GP 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\').HibernateEnabled

    If "1" is returned, it has been enabled.
    If "0" is returned, it has been disabled.

    zbook said:
    Can a command be created for checking bitlocker status?
    I have no BitLocker. I don't know what command should be used. If you have BitLocker, try the following command:

    Get-BitLockerVolume|FT -A MountPoint, ProtectionStatus, AutoUnlockEnabled

    The following is my example:
    Code:
    PS C:\Windows\system32> Get-BitLockerVolume|FT -A MountPoint, ProtectionStatus, AutoUnlockEnabled
    
    MountPoint ProtectionStatus AutoUnlockEnabled
    ---------- ---------------- -----------------
    C:                      Off
    D:                      Off
    G:                      Off
    zbook said:
    The command that jbcarreon123 posted in #1000 did not produce any results?
    I will take a look at his post #1012.

    Paul Black said:
    Code:
    del "%temp%\tpm*.log" >nul 2>&1
    I have used a similar code in "SetupDiag_&_upgrade_failure (2021-10-20).bat ".

    Del "%Temp%\SetupDiag_*.log"
      My Computer

  5. Matthew Wai's Avatar
    Posts : 6,441
    Windows 10 Home 20H2
       #1015

    jbcarreon123 said:
    Code:
    Powershell get-wmiobject -class Win32_Tpm -namespace root\CIMV2\Security\MicrosoftTpm ^| select -ExpandProperty IsActivated_InitialValue >%temp%\tpm1.log 2>&1
    See whether the following CMD code will get the same %tpm1%

    Code:
    @Echo Off
    Set "[X]=get-wmiobject -class Win32_Tpm -namespace root\CIMV2\Security\MicrosoftTpm|select -ExpandProperty IsActivated_InitialValue"
    Set [X]=PowerShell -C "&{%[X]%}"
    For /f "tokens=*" %%# in ('%[X]%') Do (Set "tpm1=%%#")
    If not "%tpm1%"=="True" (set "tpm1=False")
    Echo %tpm1% & pause

    No LOG file is needed above. The PowerShell output will be directly written into %tpm1%.
    Last edited by Matthew Wai; 22 Oct 2021 at 02:40.
      My Computer

  6. jbcarreon123's Avatar
    Posts : 1,638
    Windows 10 Pro v21H1 x64 (19043.1052), Linux (LiveUSB)
       #1016

    Try this:
    Code:
    powershell get-wmiobject -namespace root/cimv2/security/microsofttpm -class win32_tpm
    I don't have TPM.
    Post problem reports here for Batch files for use in BSOD debugging-image.png
    Post problem reports here for Batch files for use in BSOD debugging-image.png
    Last edited by jbcarreon123; 21 Oct 2021 at 10:25.
      My Computers


  7. Matthew Wai's Avatar
    Posts : 6,441
    Windows 10 Home 20H2
       #1017

    My PC has no TPM.

    Code:
    Microsoft Windows [Version 10.0.19042.746]
    (c) 2020 Microsoft Corporation. All rights reserved.
    
    C:\Windows\system32>powershell get-wmiobject -namespace root/cimv2/security/microsofttpm -class win32_tpm
    
    C:\Windows\system32>
      My Computer

  8. Paul Black's Avatar
    Posts : 15,106
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1018

    I do NOT have TPM.

    I checked using this command in a CMD Prompt > PowerShell get-tpm

    Code:
    
    TpmPresent                : False
    TpmReady                  : False
    ManufacturerId            : 0
    ManufacturerIdTxt         :
    ManufacturerVersion       :
    ManufacturerVersionFull20 :
    ManagedAuthLevel          : Full
    OwnerAuth                 :
    OwnerClearDisabled        : True
    AutoProvisioning          : NotDefined
    LockedOut                 : False
    LockoutHealTime           :
    LockoutCount              :
    LockoutMax                :
    SelfTest                  :

    If TpmPresent returns False, then unfortunately, your Motherboard does NOT have a TPM Chip.
    However, if you get . . .

    Code:
    
    TpmPresent                : True
    TpmReady                  : False

    . . . you can possibly Activate the TPM Chip in your BIOS/UEFI.
      My Computer

  9. Matthew Wai's Avatar
    Posts : 6,441
    Windows 10 Home 20H2
       #1019

    zbook said:
    For TPM: considering PowerShell Get-TPM
    Any suggestions?
    Do you think the following is what you want as per Paul Black's above post?

    PowerShell Get-TPM^|FL TpmPresent, TpmReady

    Run the above via an elevated Command Prompt.
      My Computer


  10. Posts : 39,157
    windows 10 professional version 1607 build 14393.969 64 bit
       #1020

    Code:
    Microsoft Windows [Version 10.0.19043.1288]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>PowerShell Get-TPM^|FL TpmPresent, TpmReady
    
    
    TpmPresent : True
    TpmReady   : True

    More information is needed on TPM than what is displayed in the above result.

    This computer indicated present and ready but it has version 1.2 which is insufficient when attempting to upgrade from Windows 10 to 11.




    Code:
    Microsoft Windows [Version 10.0.19043.1288]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>powershell get-tpm
    
    
    TpmPresent                : True
    TpmReady                  : True
    TpmEnabled                : True
    TpmActivated              : True
    TpmOwned                  : True
    RestartPending            : False
    ManufacturerId            : 1229346816
    ManufacturerIdTxt         : IFX
    ManufacturerVersion       : 4.32
    ManufacturerVersionFull20 : Not Supported for TPM 1.2
    ManagedAuthLevel          : Delegated
    OwnerAuth                 :
    OwnerClearDisabled        : True
    AutoProvisioning          : Enabled
    LockedOut                 : False
    LockoutHealTime           : Not Supported for TPM 1.2
    LockoutCount              : Not Supported for TPM 1.2
    LockoutMax                : Not Supported for TPM 1.2
    SelfTest                  : {128, 0, 1, 255}
    
    
    
    
    C:\WINDOWS\system32>


    Post problem reports here for Batch files for use in BSOD debugging-tpm-image-results-using-tpm.msc-10222021.png
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 11:27.
Find Us




Windows 10 Forums