Posted on 07-21-2021 02:05 AM
So we're currently experiencing an issue where some computer records in Jamf Pro do not contain an up to date list of the installed configuration profiles. Running jamf recon does not appear to correct this. Is there a way to either update or clear the list of installed configuration profiles in a Jamf Pro computer record?
07-21-2021 04:28 AM - edited 07-21-2021 04:30 AM
Hi @DanJ_LRSFC you can use the extension attribute below to check if the Configuration Profile is installed. Then create a smart group based on the Extension Attribute criteria for tracking. Use the "profileName" variable search for the profile you're looking for. Remember to update inventory after this EA has been implemented.
###########################################################################################################
# EA: WI-FI_PROFILE_NAME Installed?
###########################################################################################################
#!/bin/sh
profileName="Defer Updates 30 Days"
profiles=`profiles -C -v | grep attribute | awk '/name/{$1=$2=$3=""; print $0}' | grep "$profileName"`
if [[ ! -z "$profiles" ]]; then
echo "<result>Yes</result>"
else
echo "<result>No</result>"
fi
exit 0
Posted on 07-21-2021 05:34 AM
@bwoods Thanks but that's not what I'm looking for. Basically this summer I am wiping and reinstalling all our Macs, but on many of our Macs Jamf Pro is still thinking there are configuration profiles installed on there and it is trying to remove them, meaning the profiles aren't getting reapplied.
Posted on 07-21-2021 06:04 AM
@DanJ_LRSFC does this happen if you wipe the machine record from Jamf before re-imaging?
Posted on 07-21-2021 06:07 AM
@bwoods no, if I delete the machine record then this does not happen. However I was hoping to avoid having to do that.
07-21-2021 06:19 AM - edited 07-21-2021 06:21 AM
@DanJ_LRSFC If you don't want to go that route, try running the following commands before wiping the machines. Otherwise, wiping the record is the only way to fix this.
sudo jamf removeMdmProfile
sudo jamf removeFramework
Posted on 07-21-2021 06:55 AM
Not sure how I could get this to work? As I need to use Jamf Remote in order to issue the commands to wipe and reinstall?
Posted on 07-21-2021 06:49 AM
@DanJ_LRSFC may I ask why you're against wiping the record?
Posted on 07-21-2021 06:52 AM
I'm not, as such, it's just a pain wiping and reinstalling a classroom full of computers and then having to go through them and delete the records of the ones which failed and then wipe and reinstall them again.