Posted on 06-13-2018 06:49 AM
Recently joined a company whose computers don't have the asset tag field named, does anyone have a script to do this?
Really don't facing manually naming each one
Posted on 06-15-2018 04:39 AM
give this a try..
https://www.jamf.com/jamf-nation/discussions/18944/setting-ard-info-fields-dynamically-from-the-jss
Posted on 02-13-2020 05:36 AM
Posted on 02-13-2020 06:48 AM
Since we use the barcode in the computer name which is like "Building-StaffPosition-Barcode or HS-Teacher12345" I do this:
#!/bin/sh
#1st get computer name#
COMPNAME=`/usr/sbin/scutil --get ComputerName`
#2-grab the last 5 characters#
vasset=${COMPNAME:(-5)}
#3-set the asset in JSS#
jamf recon -skipApps -skipFonts -skipPlugins -assetTag $vasset
Gabe Shackney
Princeton Public Schools
Posted on 02-23-2022 05:26 AM
Id also say once you have the fleet enrolled with assigned asset tag info, I'd now just dump it into the PreInventory csv so it would automatically get it going forward without any needed scripting.