Posted on 09-17-2015 04:59 AM
So in the storage section of a computer there is the number of partitions. But I'm trying to create a report to see who has more then 1 paritions on there machines.
Anyone know if it can be done casper itself, or do I need to write an extension attrbute for it? Anyone create something similar to this?
Posted on 02-01-2018 10:42 AM
I am wanting to do this also. I can't seem to find a way yet. If anyone has an idea, let us know. Thanks!
Posted on 02-01-2018 10:57 AM
This is kind of a pain for a few reasons.
You may be able to do something like this (10.13.3)
#!/bin/sh
bootVolume=$(system_profiler SPSoftwareDataType | grep "Boot Volume" | awk -F': ' '{print $2}')
diskNum=$(diskutil info "$bootVolume" | grep -i "Part of Whole" | awk '{print $4}')
diskPartList=$(diskutil list $diskNum)
echo "$diskPartList"
EDIT
This would output all of the partitions on the parent disk of the boot volume. You could add a | wc -l
at the end of the echo
to see the count, but that will give to the number of lines.
Posted on 02-02-2018 07:15 AM
Thank you @tthurman , I am going to work with this some. I have a way to find active Bootcamp partitions but that doesn't tell me if someone sets up a partition for a separate Mac OS or Linux machine. I think our end answer will be setting up EFI firmware passwords on everything.