Skip to content

Josh's IT-Blog

Information Technology, and other interesting things …

  • Home
  • About
  • Contact
  • Links
  • Home
  • About
  • Contact
  • Links

delete orphaned computers from SCOM

  1. Home   »  
  2. delete orphaned computers from SCOM

delete orphaned computers from SCOM

21. January 201421. January 2014 Burkard JoshSCOMTagged SCOM

after renaming a Active Directory computer, the computer was automatically detected in SCOM with the correct new name. but after short time, I detected, that the originally agent was already there, but not reachable. so I deleted the old computer under Device Management – Agent Managed.

normally after maximum 3 days, the agent isn’t visible in the computer view. the delay of 3 days is by design. so don’t delete the computer manually to early.

If you still see the Computer showing up – even after 3 days – then in most cases, there is still a discovery associated with it. To find the discovery, use this query:

SELECT BME.FullName, DS.DiscoveryRuleID, D.DiscoveryName FROM typedmanagedentity TME 
JOIN BaseManagedEntity BME ON TME.BaseManagedEntityId = BME.BaseManagedEntityId 
JOIN DiscoverySourceToTypedManagedEntity DSTME ON TME.TypedManagedEntityID = DSTME.TypedManagedEntityID 
JOIN DiscoverySource DS ON DS.DiscoverySourceID = DSTME.DiscoverySourceID 
JOIN Discovery D ON DS.DiscoveryRuleID=D.DiscoveryID 
WHERE BME.Fullname LIKE '%ComputerName%'

in my case, I didn’t found any discovery for this computer and it was still available in the Windows Computer view one week after deletion of the agent.

so I found a solution

***THE FOLLOWING PROCEDURE IS NOT SUPPORTED BY MICROSOFT***

we need to check the database with this query for the orphaned entities:

select * from BaseManagedEntity Where FullName like FullName Like '%Windows.Computer%' and '%ComputerName%' and IsDeleted=0

now we will mark this old entries as deleted:

update BaseManagedEntity set IsDeleted=1 where FullName Like '%Windows.Computer%' and FullName like '%ComputerName%'

after this, make a refresh in your SCOM console. the orphaned Windows Computer shouldn’t be there anymore.

Post navigation

Previous: Create SCOM Dashboard for SharePoint in Visio
Next: extend the Active Directory Users class for SCSM

About

Author Image
My name is Josh Burkard.
I'm a DevOps Engineer working with one of Europees largest payroll provider. in my work I have a lot to do with Microsoft server operating systems, System Center, VMware, Microsoft Azure Cloud and other software.
On this site I will write some posts about different technology problems and their solutions.
please note also my tweets and retweets from this area.

Categories

  • General (13)
  • Hardware (9)
    • Network (8)
      • Cisco (2)
    • Storage (2)
  • Hiking (1)
  • Home Assistant (5)
  • Microsoft Azure (1)
    • Automation (1)
  • PowerShell (3)
  • Software (1)
    • Excel (1)
  • System Center (18)
    • SCCM (3)
    • SCDPM (1)
    • SCOM (12)
    • SCSM (1)
    • SMA (1)
  • VMware (8)
  • Windows 2008 R2 (10)
    • Active Directory (7)
  • Windows 2012 R2 (1)
  • Windows 2016 (1)
  • Windows 7 (4)
    • BitLocker (1)
  • WordPress (1)
Proudly powered by WordPress | Theme: goldy-mex by inverstheme.