Policy "whatif" or -list

Tangentism
Contributor III

Is there any way that I can do a dry run on a machine to see which policies it's in scope without running them?

Sort of like Powershells '-whatif' command or '-list'

5 REPLIES 5

davidacland
Honored Contributor II

Not that I know of. You can see whats in scope in the JSS, but to run something like that on the client you'll have to write a custom script that reads via the API.

Tangentism
Contributor III

The API doesn't provide a way to search groups by membership, only by name or ID.

Bah! Working through a large deployment and want to test that putting a test machine into different conditions picks up the required policies without having to reset it all the time.

StoneMagnet
Contributor III

@RandomPenguins This might be useful for you: Cargo Ship (With a nod to @mpebley who pointed out the University of Utah GitHub repo in another thread)

mm2270
Legendary Contributor III

Oh I so hear on this one. See my 'getting crusty and old' Feature Request found here, which is almost word for word what you're requesting here.

I've been wishing for a long time for some way to know, from a command line argument, or looking at the computer records API, what will run on the next check-in trigger, or any other trigger for that matter, at least as far as it's aware of. It's maddening to me that we can view this exact information in the JSS UI under a computer record but have no way else to see it. Having to drill down into an individual Mac to see this isn't terribly useful, and time consuming to boot.
There are some useful things I could come up with if Jamf would give us some way to view this outside of the browser interface.

todd_mcdaniel
New Contributor III

This is indeed the situation I wrote Cargo Ship to help with.

Please take a look here (if you haven't already): https://github.com/univ-of-utah-marriott-library-apple/scl_jamf_tools

We've also created a channel specifically for our tools on the MacAdmin slack: #uofu-mariott-tools. Please join us there for support and discussion.