Run self service from command line

DoAFlip
New Contributor

Is there a way to run a configuration profile that is set to self service distribution via the command line? I've tried jamf policy -id X, but it didn't work.

6 REPLIES 6

emily
Valued Contributor III
Valued Contributor III

Was the machine you were testing from in the scope of the Self Service policy?

DoAFlip
New Contributor

Yes, the machine is a member of the static group that is in scope for the config profile. It just says there wasn't anything find for that ID

ryanstayloradob
Contributor

You can't install a config profile with the jamf policy command. It's not technically a policy, even though it looks like one when it's available in Self Service.

You can execute a config policy with this command: jamf mdm

I really hate JAMF Nation answers like this. Completely vague. Here use this but I'm not really going to tell you how to use it in relation to your question so you can spend more hours searching for an answer. 

Look
Valued Contributor III

If you have it selected to show in Self Service and have it scoped to any users or user groups, when it is ran at a machine level (i.e from a script etc...) the machine will be out of scope, the only time it will be in scope is when the JSS is aware of the user which is only at login and when run from Self Service.

mm2270
Legendary Contributor III

I'm curious to hear about what the use case is for this? If you want it to install in the background of sorts, you could just scope it to the machines in question at either a User or Computer level and just have it pushed to the machine. No need to have it set to show in Self Service.

Barring that, I have a script that can download and install Configuration Profiles that are hosted on your JSS, which uses the API to access the profile. It can install them either at User or Computer level.