+1
Pending Review

Record last connection date - permanently

Ian Murphy 2 years ago 0

We use Control with Automate and have several hundred agents connecting to the server.

We use the standard maintenance tools to clean up old metadata. 

The problem is, one of the things which is cleared is the date of last connection - the LastConnectedEventTime field

This is a very useful bit of information to have when you have a lot of agents connecting but the maintenance scripts scrub this data.

Is there any way to preserve it?

for your information, I have a session group defined with this in the subgroup expression field:

IIF(GuestConnectedCount > 0, 'Online Now', 'Last connection ' + IIF(SUBSTRING(CONVERT(LastConnectedEventTime,System.String),1,2) IN ('10','11','12'), SUBSTRING(CONVERT(LastConnectedEventTime,System.String),1,2) + IIF(SUBSTRING(CONVERT(LastConnectedEventTime,System.String),6,1)='/', SUBSTRING(CONVERT(LastConnectedEventTime,System.String),6,5), SUBSTRING(CONVERT(LastConnectedEventTime,System.String),5,5)), SUBSTRING(CONVERT(LastConnectedEventTime,System.String),1,1) + IIF(SUBSTRING(CONVERT(LastConnectedEventTime,System.String),5,1)='/', SUBSTRING(CONVERT(LastConnectedEventTime,System.String),5,5), SUBSTRING(CONVERT(LastConnectedEventTime,System.String),4,5)))), CustomProperty1)

This allows me to see machines which have not connected recently, but displays 1/0001 for machines which haven't connected in a couple of months.