Get (via script ) all the policies installed to a computer

dgkanavias
New Contributor

Hi guys , i would like to know if there is any command or script (JSS API ) with which i can get all the policies are installed in a computer automatically .

Thanks in advance .

1 REPLY 1

davidacland
Honored Contributor II
Honored Contributor II

I've just had a quick look. There's a section in the computer record for <computer_group_memberships> and the policies have a <scope> section listing what groups are in scope.

So you would need to use a script to:

  • Read the groups the computer is a member of
  • Read each of the policies to see if the computer name or group names are in the scope

I can't find a policy log option for the API unfortunately.

If its only a case by case basis could you just use the management tab on a computer record in the JSS web interface.