Skip to content

disable_all_policies

Chris Lasell edited this page Nov 17, 2017 · 2 revisions

This will loop through and disable every policy in the JSS.

JSS::Policy.all_ids(:refresh) do |pol_id|
  pol = JSS::Policy.fetch id: pol_id
  pol.disable
  pol.save
end
Clone this wiki locally