Posted on 12-12-2012 01:54 AM
Is it possible to flush the policy history of a particular policy from the client?
Something like
[code]jamf flushPolicyHistory -id 217[/code]
?
Just wondering, and thinking it might be handy when testing...
Posted on 12-12-2012 05:41 AM
AFAIK, it flushes a machine's entire policy history. Still useful, but something more granular would be nice. Sounds like a Feature Request :)
Posted on 12-12-2012 05:45 AM
Not sure if this helps or if you're only looking for something at command line, but you can wipe policy history for just one policy on one computer via console.
View status of policy, view log, flush history for this policy/computer
-- edit sorry just saw you mention from the client.
Posted on 12-13-2012 09:28 AM
@jarednichols - yes, flushing the entire policy history is much too broad, but it would be useful to be able to do it for a specific policy and machine.
@CasperSally - yes, this is from the client (on the command line). But since it can be done from the JSS web interface, the functionality is clearly there, it just needs to be made available via the jamf binary.
I guess I'll file a feature request.
BTW - one example of usage: An application has a Self Service installer and uninstaller, with the Installer having an execution frequency of 'once per computer'. The uninstaller could then flush the Installer policy history for that computer, making the Installer available again after the uninstaller runs.
Posted on 12-13-2012 09:34 AM
I agree being able to flush a single policy via CLI or script would be super useful. But, robo, in the example you point out, you can handle this through the use of Smart Groups. Example. make a Smart group for Macs with Application Title | does not have | appX. Then set your policy to "Ongoing" instead of "Once per Computer".
If the user uninstalls the app, or runs an uninstall self service policy, etc. once the Mac re-inventories, it will fall into the above Smart Group, scoped to the policy and it shows up again for them.
While the above does mean more work in creating those Smart Groups, it does work and is partly how Casper was designed to work.
Still, put in that Feature Request, because its valid. There are definitely going to be uses for it.
Posted on 07-13-2016 04:45 AM
Posted on 07-13-2016 06:21 AM
Nope, but Under Review: https://jamfnation.jamfsoftware.com/featureRequest.html?id=973
Posted on 11-26-2020 09:24 AM
@pete_c Somehow in the last 4 years https://jamfnation.jamfsoftware.com/featureRequest.html?id=973 has disappeared. Does anyone know if this feature ever got added? The binary's help command still only has this to say:
jamf help flushPolicyHistory
Usage: jamf flushPolicyHistory
Doesn't mention any switches for specifying a particular policy. Anyone know where this is at?
- Scott
Posted on 11-26-2020 09:26 AM
Posted on 03-08-2022 01:08 PM
I wanna bring this back up because I need this now. I ran a policy to like 300 machines. Turns out I made a typo in the script and now they all have a policy log for a broken script. I would like to simply make all machines in this group forget the fact that they got it once and try again. I'd rather not flush this one policy on each machine individually, nor do I want to flush all policies for all machines.
Posted on 03-08-2022 01:13 PM
Nevermind....I got it.
Posted on 06-23-2022 03:38 AM
For a single policy? Care to share?
Posted on 06-27-2022 05:27 AM
My bad you guys. All I did was fix the script and set the policy frequency to ongoing with a custom trigger. I then sent a remote command (sudo Jamf policy -event CUSTOMTRIGGERNAMEHERE) to that smart group to run it again.