Skip to main content

PowerShell Version Audit

Summary

This dataview shows the current agent PowerShell versions.

Dependencies

PowerShell Version Audit

Columns

ColumnDescription
ClientClient name of the agent
LocationLocation name of the agent
ComputerComputer name of the agent
Operating SystemOperating system of the agent
Last ContactLast contact of the agent with the RMM
PowerShell VersionPowerShell version on the agent
Script Run TimeThe last date when the PowerShell version was checked

SQL Representation

SELECT 
c.clientid,
c.locationid,
c.computerid,
cl.name AS `Client`,
l.name AS `Location`,
c.name AS `Computer`,
c.os AS `Operating System`,
c.LastContact,
TRIM(
SUBSTRING_INDEX(ss.value, '--', 1)
) AS `Script Run Time`,
CASE WHEN TRIM(
SUBSTRING_INDEX(
SUBSTRING_INDEX(ss.value, '--', 2),
'--',
-1
)
) = ' ' THEN 'Not Detected' ELSE TRIM(
SUBSTRING_INDEX(
SUBSTRING_INDEX(ss.value, '--', 2),
'--',
-1
)
) END AS `PowerShell Version`
FROM
computers c
LEFT JOIN clients cl ON cl.clientid = c.clientid
LEFT JOIN locations l ON l.locationid = c.locationid
LEFT JOIN scriptstate ss ON ss.computerid = c.computerid
WHERE
ss.variable = 'PowershellVersion'