Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Running a CMPivot to get query of free diskpace

  • Thread starter Thread starter CodyB
  • Start date Start date
  • Replies Replies 3
  • Views Views 13K
Status
Not open for further replies.

CodyB

Member
Messages
23
Reaction score
0
Points
1
Hello;

I'm sure this is something simple but I can't seem to get it. I'm running a CMPivot on a Device Collection to get which servers have less then 10 GB of free space on the C: drive. Note that each of the servers in the device collections have at lease 2 drives.

Here's a sample of my query:
Disk | where (Name == 'C:') | where (FreeSpace <= 85899345920) | order by FreeSpace asc
Disk | where (Name == 'C:') | where (FreeSpace < 85899345920) | order by FreeSpace asc

I've tried both and each one gives me the same results. I only want to see servers that are less than 10 GB of free space on the C: drive. What am I missing in my query statement?
 

Attachments

  • CMPivot_Disk_Query_Freespace.png
    CMPivot_Disk_Query_Freespace.png
    60.4 KB · Views: 19
Hello;

I'm sure this is something simple but I can't seem to get it. I'm running a CMPivot on a Device Collection to get which servers have less then 10 GB of free space on the C: drive. Note that each of the servers in the device collections have at lease 2 drives.

Here's a sample of my query:
Disk | where (Name == 'C:') | where (FreeSpace <= 85899345920) | order by FreeSpace asc
Disk | where (Name == 'C:') | where (FreeSpace < 85899345920) | order by FreeSpace asc

I've tried both and each one gives me the same results. I only want to see servers that are less than 10 GB of free space on the C: drive. What am I missing in my query statement?

i use this in a collection query to get everything with less than 10Gig.

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace <= 10000
 
I figured out what I was doing wrong with query search within the CMPivot. I was using BITS instead of BYTES on my less than or equal paramater.

Thanks for the suggustion thoug, AhmedLS.
 
Status
Not open for further replies.

Forum statistics

Threads
7,146
Messages
27,902
Members
18,206
Latest member
tducharmebn

Trending content

Back
Top