Powershell to show disk space including mountpoints

Get-WmiObject -ComputerName -Class Win32_Volume -Filter ‘DriveType = 3’ | select name,capacity,freespace

Results from one of my SQL Servers

name capacity freespace
—- ——– ———
Q:\ 508248064 464125952
T:\ 508248064 472387584
N:\Default\SnapInfo\ 28858826752 26194558976
N:\Default\SysDB\ 21340921856 18748485632
M:\ 491794432 460210176
M:\Default\MsSqlData\ 53559341056 35197067264
M:\Default\MsSqlLog\ 32617779200 27183591424
M:\Default\Sysdb\ 21340921856 18669568000
M:\Default\SnapInfo\ 28858826752 27821281280
N:\ 286162944 262578176
N:\Default\MSSqlData1\ 107253968896 75615485952
N:\Default\MSSqlData2\ 107253968896 77887352832
N:\Default\MSSqlData3\ 107253968896 75426820096
N:\Default\MSSqlLog1\ 16078700544 12808699904
N:\Default\MSSqlLog2\ 21340921856 8436752384
N:\Default\MSSqlLog3\ 16078700544 11557416960
C:\ 104751689728 88810995712
D:\ 194580049920 84245086208

Leave a Reply

Your email address will not be published. Required fields are marked *

*