Guest User!

You are not Sophos Staff.

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

Way to remove orphaned machines from SGN directory?

Does anyone know a way to bulk-remove machines that haven't checked in, for example, in more then six months? We have a fair number of orphaned machines that are not in domain, so AD sync is not removing them from SGN dir in this case. I'm wondering if there's a way to do this via API or directly in SQL.

Thanks!

P.S. SGN on the server is 5.50.8.

:10707


This thread was automatically locked due to age.
Parents
  • After I do a refresh request to all computers after 90 days the if the PCs haven't refreshed I use a SQL query to remove all PCs that still have "Refresh Requested" value.  Not sure if this is recommended to do but it's been working for me for the past year and a half.  This is what my sql query looks like.

    delete from ivt_machines
    --select * from ivt_machines
    where exists (select safe_guard_dir.sgd_name from safe_guard_dir
                            where safe_guard_dir.sgd_id = ivt_machines.ima_machine_id
                                  and ivt_machines.ima_refresh_requested > 0
                                  and safe_guard_dir.sgd_name not like '%-%')

    You can put the "--" in front of the first line and delete from the second if you just want to see the number of PCs it will delete.  Run the query as shown to do the actual deletion.

    Also, i wanted to point out that we have department loaner laptops that don't normally talk to the network that often and we use a naming convention of "computername-dept" which is why we place that last line to disregard any computers that have a "-" in the name.

    Hope this helps.

    :11405
Reply
  • After I do a refresh request to all computers after 90 days the if the PCs haven't refreshed I use a SQL query to remove all PCs that still have "Refresh Requested" value.  Not sure if this is recommended to do but it's been working for me for the past year and a half.  This is what my sql query looks like.

    delete from ivt_machines
    --select * from ivt_machines
    where exists (select safe_guard_dir.sgd_name from safe_guard_dir
                            where safe_guard_dir.sgd_id = ivt_machines.ima_machine_id
                                  and ivt_machines.ima_refresh_requested > 0
                                  and safe_guard_dir.sgd_name not like '%-%')

    You can put the "--" in front of the first line and delete from the second if you just want to see the number of PCs it will delete.  Run the query as shown to do the actual deletion.

    Also, i wanted to point out that we have department loaner laptops that don't normally talk to the network that often and we use a naming convention of "computername-dept" which is why we place that last line to disregard any computers that have a "-" in the name.

    Hope this helps.

    :11405
Children
No Data
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?