Patch Management Solution

 View Only

SQL Report of all Software Delivery Policies and their status

  • 1.  SQL Report of all Software Delivery Policies and their status

    Posted Jan 18, 2017 07:18 PM

    I am working on a report that shows all software delivery policies, their current status, and when they were last enabled / disabled. I was hoping this was stored in an audit table somewhere.

    Does anyone know where I can find the Date it was last enabled or disabled?

     

    	SELECT 
    		  vNRI.Name AS PolicyName
    		, vNRI.Guid AS PolicyGUID
    		, IA.Enabled AS PolicyStatus
    		, vNRI.CreatedDate
    		, vNRI.ModifiedDate
    		, '' AS DateEnabled
    		, '' AS DateDisabled 
    	FROM [vNonResourceItem] vNRI
    	LEFT JOIN [ItemActive] IA
    	ON IA.Guid = vNRI.Guid
    	WHERE
    		vNRI.Attributes = 0
    		AND
    		(
    			vNRI.ClassGuid = '2D3A170E-5028-4570-BA0C-3DB775CB8BDE'
    			OR
    			vNRI.ClassGuid = '212E1D10-4905-4CDB-A90A-81AE77E9DE9A'
    		)