Remove stubborn/stuck computer objects from MS SCOM

I work with a network monitoring tool from Microsoft called System Center Operations Manager (SCOM for short)
The version of SCOM I use (2007 R2 with Fix rollup 2) has an issue that seems to affect computers that are part of a cluster –
The computers could not be deleted, which is a bit of a pain.

This query was provided by a MS support rep, the first query should return a GUID for the object(s) that match the computer name
The second gives you a preview of what you’ll change.
the 3rd actually changes the objects in the database to deleted status.
note that it doesn’t actually delete anything, it just updates the values.

Select TopLevelHostEntityId from basemanagedentity where Name like ‘%ComputerName%’

Select * from basemanagedentity where TopLevelHostEntityId = ‘GUID’

Update BaseManagedEntity Set Isdeleted=1 where TopLevelHostEntityId = ‘GUID’