Posted on 06-11-2015 08:00 AM
Hey,
Have any of you guys ever added a custom field where you can have one of your help desk guys enter a date?
Reason being we want to set a bunch of machines to be imaged by a certain date and have that in the JSS for inventory purposes, perhaps creating a smart group for when they pass that date.
Any help much appreciated!
Posted on 06-11-2015 09:50 AM
Do you want the tech to be asked to enter the date of imaging and then put it somewhere on the Mac? You can ask them using CocoaDialog and a bash script. Then, read that entry with a script to make an extension attribute.
Posted on 06-11-2015 09:58 AM
or just have a script that writes the date to a plist, then read the plist for an EA to report on.
Posted on 06-11-2015 10:18 AM
Hi,
We use the below commands in the First Boot script to write plist in /Library/Preferences and get the inventory through Extension Attribute.
echo Creating /Library/Preferences/com.xxxxxx.SDI with latest SDI information
date=`date +%m-%d-%y_%H:%M:%S`
serial=$(system_profiler|grep "Serial Number (system)"|awk '{print $4}')
version=$"XXXXXXXX"
# Create and set the SDI.plist
defaults write /Library/Preferences/com.xxxxxx.SDI InstalledDate $date
defaults write /Library/Preferences/com.xxxxxx.SDI SerialNumber $serial
defaults write /Library/Preferences/com.xxxxxx.SDI Version $version
Thanks & Regards,
Karthikeyan M
Posted on 06-18-2015 02:04 AM
Thanks for all these! @adamcodega @nessts @karthikeyan.mac you rock!