Quantcast
Channel: Symantec Connect - Endpoint Management
Viewing all articles
Browse latest Browse all 7360

ITMS agent & plugin report that also indicates which build is the current version

$
0
0

The following query will display all agents/plugins and their versions that are installed on all machines that are being managed by the SMP that the query is run against.

*********************************

declare @list table (guid uniqueidentifier)
insert into @list
select _resourceGuid as guid from Inv_AeX_AC_Client_Agent;
IF OBJECT_ID('tempdb..#a1') IS NOT NULL DROP TABLE #a1
select vc.name [Computer], aca.[Agent Name] [Agent],
aca.[Product Version] + case
when aca.[Product Version] <> a.[Max Version]
then ' *' else '' end [version]  into #a1
from @list x
left join Inv_AeX_AC_Client_Agent aca on aca._resourceGuid = x.guid
left join vComputer vc on vc.guid = aca._resourceGuid
left join ( select [Agent Name], max([Product Version]) [Max Version]
from Inv_AeX_AC_Client_Agent
group by [Agent Name] ) a on a.[Agent Name] = aca.[Agent Name]
DECLARE @agent_list varchar(900)
SET @agent_list = ''
SELECT @agent_list = @agent_list + ', ' +'[' +[Agent] +']'
from (select distinct [Agent] from #a1 ) a
order by [Agent]
SET @agent_list = substring (@agent_list, 3, len(@agent_list))
declare @sql nvarchar(2000)
set @sql = N'select [computer], ' +@agent_list +
'from (select [computer], [Agent], [version] from #a1) b1 '+
'pivot ( max(version) for [Agent] in (' +@agent_list +')) c2'
execute sp_executesql @sql

***************************

Any version that has an asterix appended to it indicates that it is not the current version.


Viewing all articles
Browse latest Browse all 7360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>