From time to time you may see greyed out ghost or orphaned entries for monitored objects in the Windows Computer View that have no corresponding object for the computer in the Agent Managed view so you cannot delete them via the normal process. This can be due to the fact that a server was decommissioned before you had a chance to properly uninstall the agent and delete it from the Administration pane.I used the procedure below to successfully remove the greyed out object from the Windows Computer view.
***THE FOLLOWING PROCEDURE IS NOT SUPPORTED BY MICROSOFT***
You will need to remove the objects from the Database. This is fairly easy to do. Here are the steps that i use when i have this issue.
System Center Operations Manager 2007 stores all “entities” it “manages” in the BaseManagedEntity table in the Operational database (named “OperationsManager”, by default). This is the place where we will be manually telling SCOM that this computer does not exist anymore. There’s a column called “IsDeleted” that stores if the agent was removed.
1. Connect to the SCOM SQL server and open SQL Management studio
2. Right click on OperationsManager database and select new query
3. Run the following query in the right window to see the status of ALL computers in SCOM
SELECT * FROM dbo.[BasemanagedEntity] where FullName Like ‘%Windows.Computer%’
4. To see the status of a specific computer in SCOM (replace the text “fqdn” with the server name)
SELECT * FROM dbo.[BasemanagedEntity] where FullName Like ‘%Windows.Computer%’ and Name Like ‘%FQDN.of.my.computer%’
5. In the results scroll to the right to find the “IsDeleted” column. 0(Zero) means the database does not know the computer has been deleted. If it is zero then we will run the next command to change it to 1 (one)
replace the text “fqdn” with the server name
UPDATE dbo.[BasemanagedEntity] SET IsDeleted = 1 where FullName Like ‘%Windows.Computer%’ and Name Like ‘%FQDN.of.my.computer%’
Going back to the Operations Console to the Monitoring & Computer section, shows us that the computer does not show in the list already. It will still take some time before it really gets deleted in the database, but visually you are already set. (Do note that the machine and its child objects like disk and CPU are still there in the Data Warehouse. This will stay there until that expired there also; which is 360 days by default).