@mitulpatel2003 sure you can do this. You'll need to use dscl
to pull the info from the local machine and the jamf
binary with the recon
verb to do so. This is a rough, not tested, script you could use. Just one way to do it.
#!/bin/bash
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
firstName=`dscl . read /Users/${loggedInUser} FirstName | /usr/bin/awk '{ print $2 }'`
lastName=`dscl . read /Users/${loggedInUser} LastName | /usr/bin/awk '{ print $2 }'`
fullName="${firstName} ${lastName}"
shortName=`dscl . read /Users/${loggedInUser} RecordName | /usr/bin/awk '{ print $2 }'`
jamfCall="jamf recon -endUsername ${shortName} -realname '${fullName}'"
${jamfCall}
@stevewood Thanks so much! going to try this out later today!
Thanks again!