Script to fix Management Commands in Pending state - what is the script actually doing?

james783
New Contributor

Trying to get an understanding of what some scripts do that were written by a previous Jamf admin. We have a device in our fleet that keeps racking up Pending management commands. The MacBook in question is up to date in terms of OS and software updates, but it never seems to process any management commands. I tried clearing them then sending a blank push, but that didn't do anything.

A bit of online searching uncovered the recommendation to run the following command:

sudo profiles renew -type enrollment

I ran that on one of my test devices (actually ran it from Self Service because the script is a payload to a Policy) and am trying to understand what the script actually does, or how I can tell that it ran successfully.

I can see in jamf.log where the script began to execute, but there's no other info in jamf.log or install.log.

I checked the system logs by running the following Terminal command:

log show --predicate 'process == "mdmclient"' --info

That returned a ton of information, and I can see events happening shortly after when I fired off the script, but I don't know exactly what I'm looking for to tell me that the script is running, or that it finished, or

1 REPLY 1

PaulHazelden
Valued Contributor

The renew enrollment script, will popup a notification that you have to accept, and I can't remember if it asks for an administrator password, but it does ask for more GUI interaction. It doesn't work via SSH because it requires you to have GUI access.
Its a bit lax in its feedback after that, I tend to go and watch the profiles list in System Settings, you will see them dissappear and reappear. If you have your JAMF set to renew all policies on enrollment, then all of your policies will start to run again.