Update computer record with list of installed configuration profiles?

DanJ_LRSFC
Contributor III

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?

8 REPLIES 8

bwoods
Valued Contributor

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

 

@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.

bwoods
Valued Contributor

@DanJ_LRSFC does this happen if you wipe the machine record from Jamf before re-imaging? 

@bwoods no, if I delete the machine record then this does not happen. However I was hoping to avoid having to do that.

bwoods
Valued Contributor

@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

 

 

 

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?

bwoods
Valued Contributor

@DanJ_LRSFC  may I ask why you're against wiping the record?

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.