Purging Maintenance only deletes resources which are managed. How do you automatically purge computers which are not managed?
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:
- 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.
- 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\".
- Import the attached notification policy Delete Unmanaged Machines.xml.
- On the notification policy select Edit Query and enter the same query as in step 1.
- 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.
- Add quotes around path to DeleteCollectionMembers.exe if a space exists. Example:
"C:\Program Files\Altiris\Delete\DeleteCollectionMembers.exe" 3bc47026-d36f-4577-940c-508e00607d48
- Click OK and Apply to Notification Policy.
- Enable the notification policy. Set the schedule to a different time, if applicable.