Get Disk Space Used

Can anyone help with this please?

I have to get the following information from servers (all Server OS’s):

  1. How much local physical disk is used per server?
  2. How much SAN disk is used per server? (understand this is difficult to distinguish)
  3. Ignore everything else – server-server mountpoints & NAS

I’ve considered using these three pieces of relevance to calculate the physical disk space used but can’t work out how to get the math to work on it:

(name of it & " - " & (total space of it / 1000 / 1000 - free space of it / 1000 / 1000) as string & " MB") of drives whose (type of it = "DRIVE_FIXED")
minus
(name of it & " - " & (free space of it / 1000 / 1000) as string & " MB") of drives whose (type of it = "DRIVE_FIXED")

Then I need to somehow exclude the NAS results which can be found if I ignore all rows that contain NETAPP from the query:

if (exists wmi) then (string values of selects "Model from Win32_DiskDrive" of wmi)

Look at these examples:

Especially this:

Q: (name of it & " - Size: " & ((total space of it /(1024*1024*1024)) as string & " GB") & ", Used:(" & (((total space of it - free space of it)*100/(total space of it)) as string) & "%25) " & (((total space of it - free space of it) /(1024*1024*1024)) as string & " GB") & ", Free:(" & (((free space of it)*100/(total space of it)) as string) & "%25) "& ((free space of it /(1024*1024*1024)) as string & " GB")) of drives whose(exists name of it AND exists free space of it AND exists type of it AND exists total space of it AND type of it = "DRIVE_FIXED" AND total space of it != 0 AND total space of it > 1024*1024*1024)
A: C: - Size: 63 GB, Used:(68%) 43 GB, Free:(31%) 20 GB
2 Likes

It’s funny, I had looked at these yesterday and for some reason missed the fact that it showed the used space doh

Thanks so much :smiley:

1 Like