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

Get IP Address Report

Using SEC 5.2.0.644 - wondering if there is a way I can get a report, or query the database, so I can get a list of all hosts and their IP addresses.  I'm looking to verify that certain subnets are in certain computer groups, without using directory synchronization.

Anyone know a way I can do this?

:41911


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

    On the "Computer Details" tab there is the computer name and IP.  You can just ctrl-C, ctrl-v this data into something like Excel.

    Otherwise, if you want to go for the database, then something like:

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0" -s, -o C:\windows\temp\iplist.csv

    would list computers that aren't deleted, you could "and" on to that: managed=1, e.g.

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0 and managed=1" -s, -o C:\windows\temp\managediplist.csv

    or even connected computers as well:

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0 and managed =1 and connected=1" -s, -o C:\windows\temp\connectediplist.csv

    Beyond that, I would suggest installing SQL Server Management Studio (or just soemthing like http://www.linqpad.net/ would do for ease) and have a browse around the tables and views in the SOPHOS52 database.  That being said, using the SRI views are the only supported interface into the database but for the odd add hock query it will not matter.  More nfo here: http://www.sophos.com/en-us/medialibrary/PDFs/documentation/sec_52_sriugeng.pdf.

    Regards,

    Jak

    :41913
Reply
  • Hi,

    On the "Computer Details" tab there is the computer name and IP.  You can just ctrl-C, ctrl-v this data into something like Excel.

    Otherwise, if you want to go for the database, then something like:

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0" -s, -o C:\windows\temp\iplist.csv

    would list computers that aren't deleted, you could "and" on to that: managed=1, e.g.

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0 and managed=1" -s, -o C:\windows\temp\managediplist.csv

    or even connected computers as well:

    sqlcmd -E -S .\sophos -d sophos52 -Q "select Name, IPAddressText from ComputersAndDeletedComputers where deleted=0 and managed =1 and connected=1" -s, -o C:\windows\temp\connectediplist.csv

    Beyond that, I would suggest installing SQL Server Management Studio (or just soemthing like http://www.linqpad.net/ would do for ease) and have a browse around the tables and views in the SOPHOS52 database.  That being said, using the SRI views are the only supported interface into the database but for the odd add hock query it will not matter.  More nfo here: http://www.sophos.com/en-us/medialibrary/PDFs/documentation/sec_52_sriugeng.pdf.

    Regards,

    Jak

    :41913
Children
No Data