wmi - Powershell query to find the total disk usage -
i trying find powershell (or wmi) query find sum of disk space utilization in pc. have next query...
but can see in image, showing separate rows each drive. how can total of disk space.
sebastian
measure-object
should work nicely. didnt info looking give both sums of freespace
, size
.
get-wmiobject -class win32_logicaldisk | measure-object -sum freespace,size -or- get-wmiobject -class win32_logicaldisk | measure-object -sum size
you need extract sum useful.
powershell wmi diskspace
No comments:
Post a Comment