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


  1. Posts : 7,606
    Windows 10 Home 20H2
       #1291

    WMIC Deprecated - HEADS UP

    Should we avoid using WMIC?
      My Computer


  2. Posts : 41,462
    windows 10 professional version 1607 build 14393.969 64 bit
       #1292

    Matthew Wai said:
    WMIC Deprecated - HEADS UP

    Should we avoid using WMIC?

    There are many tutorials that have wmic commands.

    For EF all tutorials are new and they still have wmic commands.

    So it may or may not be necessary any time soon to modify them.

    If you've got scripts with equal results then we might as well use them.
      My Computer


  3. Posts : 7,606
    Windows 10 Home 20H2
       #1293

    @zbook, run the following from Command Prompt.
    Code:
    PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|Select FriendlyName,MediaType
    Output 3 —HDD
    Output 4 —SSD
      My Computer


  4. Posts : 41,462
    windows 10 professional version 1607 build 14393.969 64 bit
       #1294

    Code:
    Microsoft Windows [Version 10.0.19043.1466]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|Select FriendlyName,MediaType
    
    FriendlyName            MediaType
    ------------            ---------
    Hitachi HTS727575A9E364         4
    
    
    
    C:\WINDOWS\system32>
      My Computer


  5. Posts : 1,777
    Windows 11 [21H2]
       #1295

    zbook said:
    Code:
    Microsoft Windows [Version 10.0.19043.1466]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|Select FriendlyName,MediaType
    
    FriendlyName            MediaType
    ------------            ---------
    Hitachi HTS727575A9E364         4
    
    
    
    C:\WINDOWS\system32>
    It looks like Windows may be detecting your HDD as SSD.
    Mine is normal as expected.

    Code:
    Microsoft Windows [Version 10.0.22000.434]
    (c) Microsoft Corporation. All rights reserved.
    
    ==============================
      jbcarreon123's CMD AutoRun
    ------------------------------
      PC Name: JB-PC
      RunAs Admin? False
      Windows Version:
      Microsoft Windows 11 Pro
    ==============================
    
    C:\Users\jbcarreon123>PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|Select FriendlyName,MediaType
    
    FriendlyName  MediaType
    ------------  ---------
    Patriot Burst         4
    USB DISK 2.0          0
    
    
    
    C:\Users\jbcarreon123>
    but, try this @zbook
    Code:
    PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|FT -A FriendlyName,@{l='MediaType';e={if ($_.MediaType -eq '0') {'USB'} elseif ($_.MediaType -eq '3') {'HDD'} else {'SSD'}};A='Right'}
    I modified Matthew's code so it will use SSD instead of 4

    Code:
    Microsoft Windows [Version 10.0.22000.434]
    (c) Microsoft Corporation. All rights reserved.
    
    ==============================
      jbcarreon123's CMD AutoRun
    ------------------------------
      PC Name: JB-PC
      RunAs Admin? False
      Windows Version:
      Microsoft Windows 11 Pro
    ==============================
    
    C:\Users\jbcarreon123>PowerShell GWMI -Class MSFT_PhysicalDisk -Namespace root\Microsoft\Windows\Storage^|FT -A FriendlyName,@{l='MediaType';e={if ($_.MediaType -eq '0') {'USB'} elseif ($_.MediaType -eq '3') {'HDD'} else {'SSD'}};A='Right'}
    
    FriendlyName  MediaType
    ------------  ---------
    Patriot Burst       SSD
    USB DISK 2.0        USB
    
    
    
    
    C:\Users\jbcarreon123>
    [code]
      My Computers


  6. Posts : 41,462
    windows 10 professional version 1607 build 14393.969 64 bit
       #1296

    This is from the Crucial scanner:

    Code:
    What's currently on your primary physical drive:
    Manufacturer:
    HGST
    Part no.:
    HTS727575A9E364
    Drive type:
    750GB 7200RPM Hard Drive
    Drive form factor:
    2.5"
    Current usage:
    205.52 GB (29.8%)
    Free space:
    483.64 GB
    Total:
    689.16 GB

    RAM & SSD Upgrades | hp - compaq | HP ZBook 17 Mobile Workstation | Crucial.com


    The windows commands do not detect the drive that is used for flash cache.
    Maybe flash cache alters the findings for the windows commands?
      My Computer


  7. Posts : 7,606
    Windows 10 Home 20H2
       #1297

    See if Disk Type is SSD or HDD in Windows 10

    If no one answers your above question, try asking a question on the following site:

    Stack Overflow - Where Developers Learn, Share, & Build Careers

    Experts abound there.

    My HDD is always shown as an HDD by all related commands.
      My Computer


  8. Posts : 41,462
    windows 10 professional version 1607 build 14393.969 64 bit
       #1298

    This is another command that initially appeared to work:

    Code:
    Microsoft Windows [Version 10.0.19043.1466]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>wmic diskdrive get mediatype
    MediaType
    Fixed hard disk media
    
    
    C:\WINDOWS\system32>
    When checked on a computer with a SSD it also displayed: Fixed hard disk media
      My Computer


  9. Posts : 7,606
    Windows 10 Home 20H2
       #1299

    Does PowerShell Get-PhysicalDisk produce correct output on the computer with an SSD?
    BTW, I have not seen BSOD for almost ten days. I have just installed Malwarebytes Anti-Ransomware again.
      My Computer


  10. Posts : 41,462
    windows 10 professional version 1607 build 14393.969 64 bit
       #1300

    That's great news.



    This is from a computer with HD in RAID 0 (This is hardware RAID (HD with flash drive (SSD)).
    The Windows commands do not report any data about the flash cache.
    The flash cache is detected by Crystal Disk info, Hard Disk Sentinel, etc.


    Code:
    Microsoft Windows [Version 10.0.19043.1466]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>powershell get-physicaldisk
    
    Number FriendlyName            SerialNumber   MediaType CanPool OperationalStatus HealthStatus Usage            Size
    ------ ------------            ------------   --------- ------- ----------------- ------------ -----            ----
    0      Hitachi HTS727575A9E364 J3340084K1LYTA SSD       False   OK                Healthy      Auto-Select 698.64 GB
    
    
    
    C:\WINDOWS\system32>


    This is the same command on a computer with SSD:

    Code:
    Microsoft Windows [Version 10.0.17763.1577]
    (c) 2018 Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>wmic diskdrive get mediatype
    MediaType
    Fixed hard disk media
    
    
    C:\WINDOWS\system32>powershell get-physicaldisk
    
    Number FriendlyName              SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage            Size
    ------ ------------              ------------ --------- ------- ----------------- ------------ -----            ----
    0      SanDisk SD6PP4M-256G-1006 150988401207 SSD       False   OK                Healthy      Auto-Select 238.47 GB
    
    
    
    C:\WINDOWS\system32>
      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 19:32.
Find Us




Windows 10 Forums