This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Old computers in my EC

Hello All -

I would like to know if is possible to get a report of the total computers that didn't connect on the last > 90 days. Also is possible to remove these computers?

I would like to keep my console clean.

Thank you.

:8319


This thread was automatically locked due to age.
Parents
  • Hello FGamer,

    I expect Jak to come up with a (more than) perfect solution :smileywink - also I do not yet make use of the recently announced

    Meanwhile a simple query:

    sqlcmd -E -S .\SOPHOS -d SOPHOS45 -Q "SELECT ID,Name,LastMessageTime,Deleted      
    FROM [SOPHOS45].[dbo].[ComputersAndDeletedComputers]
    WHERE COALESCE(LastMessageTime,0) < DATEADD(day,-90,GETDATE())

    Use the applicable values for instance (.\SOPHOS) and database (SOPHOS45) and the interval (-90). Note: Computers with Deleted=1 are not visible in SEC but still in the database.

    Using DELETE FROM instead of SELECT ... FROM will completely remove them and their associated data (errors and events) from the database. So use with consideration (and of course at your own risk).

    Christian

    :8331
Reply
  • Hello FGamer,

    I expect Jak to come up with a (more than) perfect solution :smileywink - also I do not yet make use of the recently announced

    Meanwhile a simple query:

    sqlcmd -E -S .\SOPHOS -d SOPHOS45 -Q "SELECT ID,Name,LastMessageTime,Deleted      
    FROM [SOPHOS45].[dbo].[ComputersAndDeletedComputers]
    WHERE COALESCE(LastMessageTime,0) < DATEADD(day,-90,GETDATE())

    Use the applicable values for instance (.\SOPHOS) and database (SOPHOS45) and the interval (-90). Note: Computers with Deleted=1 are not visible in SEC but still in the database.

    Using DELETE FROM instead of SELECT ... FROM will completely remove them and their associated data (errors and events) from the database. So use with consideration (and of course at your own risk).

    Christian

    :8331
Children
No Data