I recently started implementing Policy Based Management (PBM) within our Enterprise but came to the conclusion that not every Policy I created had the ability to use every possible evaluation mode possible.
Policy Based Management has four different evaluation modes:
- On Demand
- On Schedule
- On Change: Log Only
- On Change: Prevent
I came to the conclusion that the evaluation mode per facet was different. To be able to continue my work I had to have a list with all the different facets and their possible evaluation mode.
The script below will output a list of all the different facets with the possible evaluation modes:
SELECT facet.name AS 'Facet', OnDemand = CASE facet.execution_mode & 4 WHEN 4 THEN 'True' ELSE 'FALSE' END, OnChangeLogOnly = CASE facet.execution_mode & 2 WHEN 2 THEN 'True' ELSE 'False' END, OnChangePrevent = CASE facet.execution_mode & 1 WHEN 1 THEN 'True' ELSE 'False' END FROM msdb.dbo.syspolicy_management_facets facet GO