How do I check Windows RAID status from the command line?

Todd Chester 706 Reputation points
2022-11-11T23:12:00.417+00:00

Hi All,

Windows 11 - 22H2

How do I check Windows RAID status from the command line? This is what I am thinking of doing:

@Echo off

(
echo List volume
echo exit
) | C:\Windows\System32\diskpart.exe

And then checking to see if Status=Healthy for the RAID partition. Is there a better way?

K:\Windows\NtUtil>DiskPart.ListVol.bat | grep -i " C "
Volume 3 C DRIVE_C NTFS Partition 39 GB Healthy Boot

Many thanks,

-
T
DISKPART needs to be run as an Administrator. AAAAHHHHH!!!!

Is there a way to call diskpart that will elevate it to administrator so I can call it from a user? And No UAC?

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Docs 15,761 Reputation points
    2022-11-13T01:05:28.11+00:00

    This is one method to detect RAID status using command line:

    diskpart
    lis dis
    sel dis W
    (replace W with the disk number)
    det dis

    For the det dis results view the row: Type

    C:\WINDOWS\system32>diskpart  
      
    Microsoft DiskPart version 10.0.19041.964  
      
    Copyright (C) Microsoft Corporation.  
    On computer: DESKTOP-K2CP43S  
      
    DISKPART> lis dis  
      
      Disk ###  Status         Size     Free     Dyn  Gpt  
      --------  -------------  -------  -------  ---  ---  
      Disk 0    Online          698 GB      0 B  
      
    DISKPART> sel dis 0  
      
    Disk 0 is now the selected disk.  
      
    DISKPART> det dis  
      
    Hitachi HTS727575A9E364  
    Disk ID: 2CE38090  
    Type   : RAID  
    Status : Online  
    Path   : 0  
    Target : 1  
    LUN ID : 0  
    Location Path : PCIROOT(0)#PCI(1F02)#RAID(P00T01L00)  
    Current Read-only State : No  
    Read-only  : No  
    Boot Disk  : Yes  
    Pagefile Disk  : Yes  
    Hibernation File Disk  : No  
    Crashdump Disk  : Yes  
    Clustered Disk  : No  
      
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info  
      ----------  ---  -----------  -----  ----------  -------  ---------  --------  
      Volume 1     K   System Rese  NTFS   Partition    499 MB  Healthy    System  
      Volume 2     C   Windows      NTFS   Partition    689 GB  Healthy    Boot  
      Volume 3     D   HP_TOOLS     FAT32  Partition   2056 MB  Healthy  
      Volume 4                      RAW    Partition   7148 MB  Healthy    Hidden  
      
    DISKPART>  
    

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .

    2 people found this answer helpful.

  2. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2022-11-12T09:32:13.513+00:00

    Hi @Todd Chester ,

    maybe this is helpful: https://gist.github.com/schakko/4713248

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.

  3. Todd Chester 706 Reputation points
    2022-11-12T10:27:45.833+00:00

    Thank you!

    I wrote something very similar. I read disk partpart and search for the line with "Mirror" on it. Then look for teh status of "Healthy". If not, I throw a popup.

    It would be really helpful if I could get this information from a command that did not require administrator privileges.

    0 comments No comments

  4. Castorix31 90,681 Reputation points
    2022-11-13T08:58:38.52+00:00

    You can use

    wmic diskdrive get status

    or

    wmic diskdrive 0 get status
    wmic diskdrive 1 get status
    etc...

    which does not need to be Admin

    (Diskpart uses IVdsService which needs Admin rights...)


  5. Docs 15,761 Reputation points
    2022-11-14T03:22:43.247+00:00

    These were the results with the above wmic commands:

    Microsoft Windows [Version 10.0.19045.2251]
    (c) Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>wmic diskdrive get status
    Status
    OK

    C:\WINDOWS\system32>wmic diskdrive 0 get status
    Status
    OK

    Besides diskpart using administrative command prompt Ive not found any wmic commands that display raid information.

    The list of available wmic commands available using: wmic diskdrive get /? were all tried.
    https://winaero.com/get-disk-drive-information-in-windows-10-with-this-command/
    None displayed RAID similar to diskpart results.

    RAID information can be viewed by using free third party software.

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.