Undelete All Deleted Computers

Continuing the discussion from Retrieve details of a computer removed from database?:

What if you needed to restore multiple computers?

Hypothetically speaking… if you ran the computer remover tool and fat fingered the return, and ended up removing way more computers than you wanted to. How would you restore all of the machines, so you could re-run the removal tool a second time and only remove the ones you really meant to remove?

Hypothetically speaking.

While this is hypothetically possible, one thing to consider is that if the deleted endpoints report back in, FillDB will undelete them such that they are visible once more in the Console and Web Reports.

1 Like

You could try

UPDATE COMPUTERS set IsDeleted = 0 where IsDeleted = 1

Hypothetically speaking, of course.

For someone who’s actually performed resurrections, do they come back with all of their previously-reported properties, or do they come back as empty shells of their former selves (Lazarus, or Pet Semetary?)

I could see a mass revival being useful if, say, you need to retrieve the serial numbers, asset tags, etc. of the machines that were moved to a warehouse without checking them manually or plugging them back in; but if they come back without their last reported property values I don’t see much of a use case

It depends on factors such as whether or not the Computer Remover utility was leveraged with the ‘purge’ (-E) option since they were marked as deleted. For typical use cases revolving around reporting requirements, I’d suggest that a lot can be done via the database without having to resurrect the machines as you put it (I like that!). It’s probably just better to let existing/valid machines re-report in and undelete themselves. Those that don’t report in within 30 (or so) days are typically marked as deleted in most cases anyway (via the Computer Remover/BESAdmin options).

Thanks Jason, that is what I did and then re-ran the purge correctly.