Deployment Status SQL

Rafael Aguilar 496 Reputation points
2020-12-18T12:23:18.887+00:00

Hi Team.

I need to group and submit a report of all teams that are in compliant, in progress, error and unknown status, in sql can be done? The filter can be the title of the display e.g. the AssignmentName.

49487-image.png

I was reviewing the native sccm reports but none of them meet the requirements.

Thanks for your help.

Microsoft Security Intune Configuration Manager Updates
{count} votes

Accepted answer
  1. AllenLiu-MSFT 49,311 Reputation points Microsoft External Staff
    2020-12-23T07:06:18.817+00:00

    @Rafael Aguilar
    How about this query:
    select
    vrs.Name0,
    a.Assignment_UniqueID as DeploymentID,
    a.AssignmentName as DeploymentName,
    sn.StateName as LastEnforcementState
    from v_CIAssignment a
    join v_AssignmentState_Combined assc on a.AssignmentID=assc.AssignmentID
    join v_StateNames sn on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0)
    join v_R_System vrs on vrs.ResourceID = assc.ResourceID

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Rafael Aguilar 496 Reputation points
    2020-12-23T15:36:20.787+00:00

    Good Afternoon AllenLiu-MSFT.

    Thank you very much, your help has been very useful and I hope people like you exist more.

    The query served me as a base and I added other parameters and a filter.

    Thank you.


  2. Rafael Aguilar 496 Reputation points
    2020-12-23T21:31:53.647+00:00

    Hello AllenLiu-MSFT.

    Do you know of any courses or books that can help me with sql consultations focused on sccm?

    Thank you.

    Regards.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.