Many times a Notification Server database can get bloated with incorrect or unreferenced information. Managed machines must have appropriate links between certain tables to make sure that resource data is correctly referenced. If not, those computer resources are essentially unusable. Often, they cause other solutions to run incorrectly.
The attached C# snippet actually does a quick comparison with all computer references in the vComputer view, and verifies whether or not those same references exist in the ResourceKey Table. If not, they are deleted, and then, on the next agent configuration interval, they can be recreated correctly.
To use this tool, simple rename to a .cs extention, and run it with NScript. Syntax is:
Nscript.exe delete_computer_if_not_in_resourcekey.cs
As always, please exercise caution when using this tool. Backup your data prior to use!