How to purge unmanaged computers

book

Article ID: 181211

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Question
Purging Maintenance only deletes resources which are managed. How do you automatically purge computers which are not managed?

Answer
To purge unmanaged computers, you need a Notification Policy to run a purge executable and set to run against a collection.

Here are the steps:

  1. Create a Collection called "All Unmanaged Computers" using the Enter SQL Directly option. Here is the SQL:

    SELECT GUID FROM vResource  
    WHERE IsManaged = 0        
        AND (ResourceTypeGUID = '493435F7-3B17-4C4C-B07F-C23E7AB7781F'   
        OR ResourceTypeGUID = '2C3CB3BB-FEE9-48DF-804F-90856198B600')

    • And have the collection exclude the collections All Notification Servers, All Package Servers, and All eXpress Deployment Server computers.
    • If you have Child Notification Servers, create a collection for those and exclude it all well.
  2. Download the attached DeleteCollectionMembers.exe and DeleteCollectionMembers.exe.config and place them in a new folder under the "Notification Server" directory. Example: "G:\Altiris\DeleteCollectionMembers\".
  3. Import the attached notification policy Delete Unmanaged Machines.xml.



  4. On the notification policy select Edit Query and enter the same query as in step 1.
  5. On the notification policy, click the pencil icon in the Automated Action section. Edit the "Execute Application" command line and change the GUID to the GUID of your collection that you created in step 1. To get the collection GUID, right-click on your collection and go to Properties and that will show the GUID. 
  6. Add quotes around path to DeleteCollectionMembers.exe if a space exists. Example:
         "C:\Program Files\Altiris\Delete\DeleteCollectionMembers.exe" 3bc47026-d36f-4577-940c-508e00607d48


  7. Click OK and Apply to Notification Policy.
  8. Enable the notification policy. Set the schedule to a different time, if applicable.

Attachments

DeleteCollectionMembers.zip get_app