Per individuare l'ultima data e ora in cui è stato installato un prodotto McAfee Enterprise, eseguire il seguente query SQL nel database di ePO Core:
- Accedere a SQL Server Management Studio.
- Fare clic con il pulsante destro del mouse sul database McAfee ePO e selezionare nuova query.
- Copiare lo script SQL riportato di seguito e incollarlo nella finestra SQL query:
NOTA:Per informazioni, consultare KB67591-come eseguire un script SQL fornito da assistenza tecnica nel database di ePolicy Orchestrator.
Query 1- Il query riportato di seguito Mostra tutti i sistemi gestiti con ePO con le
LastInstalled informazioni:
----------------------------------------------------------------------------------------------------------------------
create table #temp
(ProductCode nvarchar(50),
ProductVersion nvarchar(50),
ParentID int,
LastInstalled datetime
)
Insert into #temp
SELECT EPOProductProperties.ProductCode AS ProductCode, EPOProductProperties.ProductVersion AS ProductVersion,EPOProductProperties.ParentID,
COALESCE(MAX(EPOProductProperties.LastInstalled),MAX(EPOProductEvents.ReceivedUTC)) AS LastInstalled
FROM EPOProductProperties WITH (NOLOCK)
LEFT JOIN EPOProductEvents WITH (NOLOCK) ON EPOProductProperties.ProductCode=EPOProductEvents.ProductCode
AND EPOProductProperties.ParentID=EPOProductEvents.NodeID AND EPOProductEvents.Type='Install'
WHERE EPOProductProperties.ParentID in (SELECT ParentID FROM EPOComputerProperties) GROUP BY EPOProductProperties.ProductCode, EPOProductProperties.ProductVersion,EPOProductProperties.ParentID
Select #temp.ProductCode, #temp.ProductVersion,#temp.ParentID,#temp.LastInstalled,EPOComputerProperties.ComputerName
FROM #temp JOIN EPOComputerProperties ON #temp.ParentID = EPOComputerProperties.ParentID
If(OBJECT_ID('tempdb..#temp') Is Not Null)
Begin
Drop Table #temp
End
------------------------------------------------------------------------------------------------------------------
Output:
Di seguito è riportato un esempio dei risultati che il query genera:
Query 2- Il query riportato di seguito consente di ottenere i risultati di un sistema gestito con le informazioni di LastInstalled:
------------------------------------------------------------------------------------------------------------------
create table #temp
(
ProductCode nvarchar(50),
ProductVersion nvarchar(50),
ParentID int,
LastInstalled datetime
)
Insert into #temp
SELECT EPOProductProperties.ProductCode AS ProductCode, EPOProductProperties.ProductVersion AS ProductVersion,EPOProductProperties.ParentID,
COALESCE(MAX(EPOProductProperties.LastInstalled),MAX(EPOProductEvents.ReceivedUTC)) AS LastInstalled
FROM EPOProductProperties WITH (NOLOCK)
LEFT JOIN EPOProductEvents WITH (NOLOCK) ON EPOProductProperties.ProductCode=EPOProductEvents.ProductCode
AND EPOProductProperties.ParentID=EPOProductEvents.NodeID AND EPOProductEvents.Type='Install'
WHERE EPOProductProperties.ParentID IN (SELECT AutoID FROM EPOLeafNodeMT WHERE NodeName = 'rgcmovesvm')
GROUP BY EPOProductProperties.ProductCode, EPOProductProperties.ProductVersion,EPOProductProperties.ParentID
Select #temp.ProductCode, #temp.ProductVersion,#temp.ParentID,#temp.LastInstalled,EPOComputerProperties.ComputerName
FROM #temp JOIN EPOComputerProperties ON #temp.ParentID = EPOComputerProperties.ParentID
If(OBJECT_ID('tempdb..#temp') Is Not Null)
Begin
Drop Table #temp
End
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nota: per verificare i risultati, è necessario sostituire il
NodeName = rgcmovesvm nome del rispettivo host.
Output:
Di seguito è riportato un esempio dei risultati che il query genera:
ProductCode |
ProductVersion |
ParentID |
LastInstalled |
ComputerName |
DC__AM__4000 |
4.9.2.109 |
2 |
05/24/2021 19:04 |
rgcmovesvm |
DC__GS__4000 |
4.9.2.109 |
2 |
05/24/2021 19:04 |
rgcmovesvm |
DXL_____1000 |
6.0.3.278 |
2 |
05/24/2021 19:04 |
rgcmovesvm |