none
Hard disk information from command prompt

    Question

  • Hi,

    How to get the information(size, free,used space) of all the hard disk drives with one command in command prompt? please tell if anyone knows this command because i dint find any way to get info on all drives using a single command.

    Using fsutil volume diskfree c:   or  dir command we can get info on one particular drive, but how to get this on all drives in the system using a single command?

    thanks

    Tuesday, September 18, 2012 8:36 AM

Answers

  • I got the answer

    the following command can be used.

    wmic logicaldisk get size,freespace,caption

    the output is 

    Caption  FreeSpace    Size
    C:       10293153792  42949668864
    D:       38401937408  74088181760
    E:       37109010432  42686476288

    • Marked as answer by RameshLD Tuesday, September 18, 2012 8:46 AM
    Tuesday, September 18, 2012 8:46 AM

All replies

  • I got the answer

    the following command can be used.

    wmic logicaldisk get size,freespace,caption

    the output is 

    Caption  FreeSpace    Size
    C:       10293153792  42949668864
    D:       38401937408  74088181760
    E:       37109010432  42686476288

    • Marked as answer by RameshLD Tuesday, September 18, 2012 8:46 AM
    Tuesday, September 18, 2012 8:46 AM
  • Thank you for sharing your experience.

     
    Wednesday, September 19, 2012 1:50 AM
  • How to get the above in GB ?

    Shashidhar N Bharadwaj

    Friday, October 25, 2013 11:32 PM
  • How to get the above in GB ?

    Shashidhar N Bharadwaj

    You could do that with scripting, e.g.:

    http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/08/use-powershell-to-create-a-report-displaying-free-disk-space.aspx

    http://blogs.technet.com/b/heyscriptingguy/archive/2013/08/29/powertip-list-physical-drives-with-powershell.aspx


    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    Saturday, October 26, 2013 4:55 AM
  • good one, cheers
    Thursday, November 14, 2013 3:30 AM
  • Thanks for making things easier for us Ramesh!
    Tuesday, April 29, 2014 1:15 PM
  • Hi Ramesh,

    is there any way to get the used space data.

    Thanks

    Arun

    • Proposed as answer by Sesha Sravanthi Thursday, November 27, 2014 9:40 AM
    • Unproposed as answer by Sesha Sravanthi Thursday, November 27, 2014 9:40 AM
    Tuesday, May 20, 2014 11:25 AM
  • Get-WmiObject Win32_LogicalDisk -ComputerName <computer fqdn> -Filter "DeviceID='drive letter:'" | select-object Size,Freespace | % {$_.FreeSpace=($_.FreeSpace/1GB);$_.Size=($_.Size/1GB);$_}

    For example, if i want to know the G drive details on the server dc1.contoso.com, then

    Get-WmiObject Win32_LogicalDisk -ComputerName dc1.contoso.com -Filter "DeviceID='G:'" | select-object Size,Freespace | % {$_.FreeSpace=($_.FreeSpace/1GB);$_.Size=($_.Size/1GB);$_}

    the above command will get you the drive details of a specific drive of a remote computer in GBs.

    Thursday, November 27, 2014 9:40 AM
  • thank you

    How to receive information in percent ?

    Sunday, January 25, 2015 12:24 PM
  • Found a script at this link http:\\winteltools.com\get-drivesize which can fulfill your purpose to provide details in GB and percentage occupied.
    Wednesday, July 15, 2015 6:41 PM
  • in command prompt, is there a way to make to my recovery drive to format it?...because the only thing that I can think of is, that seeing that my windows 7 crashed but leaving the command prompt open I fill like it's hope to able to do so. reason being, I really wasn't paying no mine to my recovery but it turned red of course unknowning the reason until I studied it...it's kind  of funny but it hurts because i'm trapped out of my pc...amen
    Sunday, April 03, 2016 4:10 PM
  • Thanks to share commands

    If I need disk size and free space in GB with percentage of the disk.

    Thanks & Regards,

    Govardhan Challagolla.

    Tuesday, May 24, 2016 11:39 AM
  • 1.Run cmd

    2.Type "diskpart" ...hit Enter

    3.Type "list disk"....hit Enter

    now..you can see ur total HDD space in GB.

    Tuesday, June 21, 2016 2:11 AM