Date Dropdown Menu / Extension Attribute.

Anonymous
Not applicable

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!

4 REPLIES 4

adamcodega
Valued Contributor

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.

nessts
Valued Contributor II

or just have a script that writes the date to a plist, then read the plist for an EA to report on.

karthikeyan_mac
Valued Contributor

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

Anonymous
Not applicable

Thanks for all these! @adamcodega @nessts @karthikeyan.mac you rock!