I have the following statements and I’m trying to get a mesh of the two. I would like the ability to see the free space of other drives on my servers, but the twist is that I’d like to see the ones that are below 10 Percent free… Currently I can determine which machines are below 10 percent on the system drive only.
My current statement:
((significance place
0
of
((free space
of
drive
of
system folder
as
floating point
/
total space
of
drive
of
system folder
as
floating point)
100
))
as
string)
&
" Percent Free"
This is what I’ve found and would like to customize so that I can see the percentage free below 10 percent.
((
if
property
“Description”
of
it
as
string
contains
“Local Fixed Disk”
then
(substring after
“=”
of
(property
“DeviceID”
of
it
as
string)
&
", "
&
(substring after
“=”
of
((property
“FreeSpace”
of
it
as
string))
as
integer
/
1024
/
1024
/
1024
)
as
string
&
“GB Free”
)
else
nothing
)
of
select objects (
“DeviceID,Description,FreeSpace from win32_logicaldisk”
)
if (exists drive whose (((((free space of it) * 100)/(total space of it)) < 80) and ((type of it = “DRIVE_FIXED”)))) then ((name of it, ((free space of it) * 100)/(total space of it)) of drives whose (((((free space of it) * 100)/(total space of it)) < 80) and ((type of it = “DRIVE_FIXED”))) as string) else (“No Drives Below Criteria”)
Thank you! You guys are a great help. I was able to use the following:
(name of it & " Free = " & (free space of it /1024 /1024 /1024) as string & "GB " & " - Total = " & (total space of it /1024 /1024 /1024) as string & "GB " & " - Percent Free = " & (free space of it * 100 / total space of it)as string & “” & “.”) of drives whose (type of it = “DRIVE_FIXED”)
I’ll post the finished file I used for anyone else who is interested.
(name of it & " - Size: " & ((total space of it /(102410241024)) 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 spaceof it) /(102410241024)) as string & " GB") & “, Free:(” & (((free space of it)100/(total space of it)) asstring) & "%25) "& ((free space of it /(102410241024)) as string & " GB"
))
of
drives
whose
(
exists
name
of