How to delete systems in a Filter?
search cancel

How to delete systems in a Filter?

book

Article ID: 248749

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

If and Administrator finds systems that they want to delete and they put them in the same Filter, is there a way to delete the systems that are in that Filter?

 

Resolution

One way to delete systems is by adding systems individually to the same filter.  The contents of the Filter can then be deleted using a script, as shown below.

Create a new Filter, and note the GUID of the Filter (right-click > Properties will show you the GUID).

This SQL command will put systems in the Filter in the ItemToDelete table.  This contents of this table is deleted on the Quarter-hour schedule:

NOTE: before proceeding, please validate that you have a current backup of the SQL Database

insert into itemtodelete 
select cm.ResourceGuid, getdate()
from CollectionMembership cm
where cm.CollectionGuid = 'ABCDEFG-ABCD...'   -- Enter Filter GUID here

This SQL script can be used in a Server Task and scheduled to run as needed.

Additional Information

Also see KB 179249 "Utility provided for deleting items based on GUID in the Altiris database"