How to delete computers that have not reported Inventory in days
Last Updated January 03, 2007
Question How can I delete computers from my Notification Server database based on the criteria of not receiving Inventory in a certain amount of time?
This script is based in the Latest Inventory Date contained in the database for all the computers. By default, this script will delete computers that have not sent Inventory information for the last 30 days. If you want to change the default value of deleting computers that have not reported inventory in 30 days, open the file with notepad and locate the following line:
set @days = 30
Change 30 to the amount of days that you want to delete (for example 45).
This is an NS script and must be run in the Program Files\Altiris\Notification Server\bin folder using the command line: NScript.exe %File_Name.cs%. See the Readme file attached for more details of how to run this script. Change the .txt extension to .cs for the DeleteComputersFromTheNS file in order to run the script.
// Delete Computers that have not reported inventory in 30 days