Hey all,
I see that when running scripts, the first three parameters ($1-$3) are mount point, computer name, and username. I also see that I could enter additional parameters when running the script. Can those parameters be a lookup/dynamic instead of static information? Such as, pull an attribute from the Jamf asset for each asset it runs on?
Say you want to update hostnames based on <username>-<serial> but the local username is spelled wrong or non-conforming. I want the username it pulls to be from the asset's assigned user's username, not the local computer's username. So in parameter 4 I'd like to put in something like "JamfAsset.AssignedUser.Username" so for each asset this script runs on it enters the correctly assigned username.
My alternatives I can think of so far are to either exclude the exceptions from the policy and manually manage their hostnames, or find a way to actively correct their local usernames (which can lead to a whole host of additional problems).
Any thoughts on if this is possible or if I'm approaching this wrong?
Thank you in advance!!
PJ