Login to participate
Endpoint Management & Virtualization BlogsRSS

Removing Old Computers Placed By Resource Discovery Into Database

Bcomp's picture

How will you be able to remove old computers that were placed by resource discovery into the database? This tech tip will tell you how to do so.

The easiest way is to create a collection which shows unmanaged computers for a discovery method. Once the collection is created, review the set of computer resources, then select the needed computers, right-click, and choose Delete.

Run the following SQL query to create this collection:

USE Altiris   --Or your database name
select vc.[Guid]
, Name
, IsManaged
from vComputer vc
join Inv_AeX_AC_Discovery dis on dis.[_ResourceGuid] = vc.[Guid]
where dis.[Discovery Method] in ('DomainMembership') AND IsManaged<>'1'
GO

pebcak's picture

This fails for me with an

This fails for me with an "Incorrect syntax near "USE". The DB name is correct.

setral's picture

That's odd, this query

That's odd, this query works perfectly fine for me, even doing copy/paste directly out of the text box.

Did you put ' ' marks around the DB name? If so, remove them that will cause a Syntax error.

neil_rogers's picture

change the DB

post the exact syntax you tried. (also make sure there are no funny characters in what you pasted)

also try
USE altiris -- <--change to the altiris db
select top 10 * from item

neil

jjesse's picture

change the db name?

When you installed Altiris did you set Altiris to use a diferent DB name then the default?

Jonathan Jesse
Director of Training
ITS Partners

Jonathan Jesse
Practice Principle
ITS Partners