Report failed managed installation
I'm trying to make a report to list the most failed managed installation without success... Does anyone already did it ?
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
gwir
8 years ago
I found the solution here : http://www.itninja.com/blog/view/k1000-reports-tracking-managed-installs
select S.DISPLAY_NAME as MANAGED_INSTALL, S.DISPLAY_VERSION as SOFTWARE_VERSION, M.NAME as MACHINE,
case
when MIA.ATTEMPT_COUNT = MI.MAX_ATTEMPT_COUNT then 'Failed'
when (MS.MACHINE_ID > 0 and MI.UNINSTALL = 1) then 'Failed to Uninstall'
else 'Not Installed'
end as DEPLOYMENT_STATUS,
M.IP as 'IP Address', M.LAST_SYNC, M.USER_NAME as 'Last User'
from SOFTWARE S
join MI on (S.ID = MI.SOFTWARE_ID)
join MI_LABEL_JT MIL on (MI.ID = MIL.MI_ID)
join LABEL L on (MIL.LABEL_ID = L.ID)
join MACHINE_LABEL_JT ML on (L.ID = ML.LABEL_ID)
join MACHINE M on (ML.MACHINE_ID = M.ID)
join SOFTWARE_OS_JT SO on (SO.SOFTWARE_ID = S.ID and SO.OS_ID = M.OS_ID)
left join MACHINE_SOFTWARE_JT MS on (M.ID = MS.MACHINE_ID and MS.SOFTWARE_ID = S.ID)
left join MI_ATTEMPT MIA on (MIA.MI_ID = MI.ID and MIA.MACHINE_ID = M.ID)
where MI.ENABLED != 0
and (MIA.ATTEMPT_COUNT = MI.MAX_ATTEMPT_COUNT or MI.UNINSTALL = 1)
order by MANAGED_INSTALL, SOFTWARE_VERSION, DEPLOYMENT_STATUS, MACHINE