Help with disk analysis

hey guys,

Could you help me create an analysis that identifies Offline Disks and their size on Windows servers?

I tried some alternatives with my little knowledge without success.

thanks for the time

How would you find that info in the UI or on the command line or in WMI or in the registry? Can you provide examples of different ways to find that info without using BigFix?

Also, see these related examples to see if they help:

in WMI I can identify when a disk does not have a partition, which would already be a clue that it is offline

Q: selects “Partitions from Win32_DiskDrive” of wmi
A: Partitions=1
A: Partitions=1
A: Partitions=1
A: Partitions=2
A: Partitions=1
A: Partitions=0 ( HERE IS OFFLINE )
T: 30233

I’m having trouble writing a exists partition = 0

1 Like
q: exist wmi whose (exists selects "Partitions from Win32_DiskDrive where Partitions = 0" of it)
A: False

OR

Q: exists selects "Partitions from Win32_DiskDrive where Partitions = 0" of wmi
A: False

The former should escape WMI errors, which are not unheard of.

1 Like

Thanks Ageorgiev it worked perfectly for this first moment, I appreciate your time

2 Likes

Use wmis instead of wmi to handle many error conditions in either case.


I would start by looking at the raw data like this:

selects "* from Win32_DiskDrive where Partitions = 0" of wmis

This helps you know what you can inspect.

Then you can pull out just the size like this:

(it as integer) of string values of properties "size" of select objects "* from Win32_DiskDrive where Partitions = 0" of wmis

If you only want to know if such a partition exists, then I would do: (as mentioned above with a minor tweak)

exists selects "Partitions from Win32_DiskDrive where Partitions = 0" of wmis

Reference:

1 Like

JGSTEW !!

Thank you for sharing your time with my question.