Skip to main content
Question

Update computer record with list of installed configuration profiles?


Forum|alt.badge.img+10

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

bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • July 21, 2021

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

 


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 137 replies
  • July 21, 2021
bwoods wrote:

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
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • July 21, 2021

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 137 replies
  • July 21, 2021
bwoods wrote:

@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
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • July 21, 2021

@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

 

 

 


bwoods
Forum|alt.badge.img+14
  • Honored Contributor
  • 473 replies
  • July 21, 2021

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 137 replies
  • July 21, 2021
bwoods wrote:

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • 137 replies
  • July 21, 2021
bwoods wrote:

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings