Last year, I created an extension attribute for reporting if the current logged in user is an admin user. The extension attribute is below. I noticed a few months ago that this EA had stopped working. The output of the EA was blank. What got it working was to remove the "^" symbol in the results line. Removing that symbol means that the EA will report "yes" but not "Yes". We standardize all yes/no answers in EAs with capital letters. All of my EAs get pulled in by PowerBI. I can't figure how how to capitalize the first letter in the output for "isAdmin". This does work perfectly when I run it in CodeRunner either as bash or zsh. The result I need if a user is an admin is "Yes", not "yes". How can I get this to work? I know how to capitalize ALL letters in the output but I can't find anything that capitalizes the first letter. I remember when writing this EA last year, I found that using ^ is what would capitalize the output, and it was working in Jamf Pro... until just a few months ago.
#!/bin/bash
currentuser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
isAdmin=$(dseditgroup -o checkmember -m $currentuser admin | /usr/bin/awk '{print $1}')
echo "<result>"${isAdmin^}"</result>"