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

newly added computers

Hi,

is it possible in somewhay to have a view on newly added computers? I would like to check how many/which computers have been added in certain period of time, like last week for example.

Regards

Marcus

:27453


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

    You don't mention the version of SEC, but the ComputersAndDeletedComputers table in the database holds the computer records, this has an "InsertedAt" column, so you could use that, for example:

    sqlcmd -E -S .\sophos -d sophos51 -Q "SELECT Name, DomainName, InsertedAt FROM dbo.ComputersAndDeletedComputers where dateadd(m, -3, GETUTCDATE()) < InsertedAt"

    You can adjust the DateAdd function as required:

    http://msdn.microsoft.com/en-us/library/ms186819.aspx

    the query above returns the computers added in the last 3 months.

    Regards,

    Jak

    :27455
Reply
  • HI,

    You don't mention the version of SEC, but the ComputersAndDeletedComputers table in the database holds the computer records, this has an "InsertedAt" column, so you could use that, for example:

    sqlcmd -E -S .\sophos -d sophos51 -Q "SELECT Name, DomainName, InsertedAt FROM dbo.ComputersAndDeletedComputers where dateadd(m, -3, GETUTCDATE()) < InsertedAt"

    You can adjust the DateAdd function as required:

    http://msdn.microsoft.com/en-us/library/ms186819.aspx

    the query above returns the computers added in the last 3 months.

    Regards,

    Jak

    :27455
Children
No Data