Posted on 04-10-2015 08:21 AM
I set up a Smart Computer Group with the criteria Partition Name has Macintosh. I'm not getting any results even though I know there are 500+ machines that the boot drive is named Macintosh HD. What am I doing wrong?
Posted on 04-10-2015 08:26 AM
Because that criteria doesn't do what you think it does. If you click the little ellipses button (...) next to the criteria name, you'll see it doesn't list the actual partition names, but things like "Boot Partition"
If you want to build a Smart Group on the hard drive name, that's something different. There is no built in criteria that captures that as far as I know, so you'd need to create an Extension Attribute to capture it.
Posted on 04-10-2015 08:31 AM
Just to make this a little more helpful, here's an EA that will capture the Device or Media name of the internal boot hard drive.
#!/bin/sh
HDName=$( diskutil info / | awk -F': *' '/Media Name/{print $NF}' )
echo "<result>$HDName</result>"
Posted on 04-10-2015 08:45 AM
Interesting, odd that it does not return the name. I'll be adding the EA that you wrote. Thanks for the help!!
Posted on 04-16-2015 11:13 AM
I added the script you created and well over half of the of the MacBooks are reporting the drive name as "Customer". This has me stumped.
Posted on 04-16-2015 11:20 AM
That's pretty weird. I don't know why it would be grabbing a name like that. Can you remote into one of the systems where its showing up like that in the EA, and run the following? Or perhaps do it through Casper Remote?
diskutil info /
That should only be pulling information from diskutil for the boot volume. See what shows up in the output for Device / Media Name line.
You could try modifying the awk regex from Media Name to Volume Name to see if that helps.
Posted on 04-17-2015 07:25 AM
Changing it to Volume Name did the trick. Thanks!
Posted on 04-17-2015 07:29 AM
OK, not sure why the other one wasn't working, but maybe there's something unique about your systems. Anyway, glad that got it working properly.