Some ci's don't have assets

Prince Sai
Giga Expert

Hi All,

 

We have 1000 configuration items don't have any related hardware records. I want to create a 1000 related hardware records at a time.

 

For example: 1000 ci's (computer table cmdb_ci_computer) don't have assets. I want to create 1000 computer hardware records.

 

I need any fix script which will fulfill my requirement?

 

Thanks 

6 REPLIES 6

CMDB Whisperer
Mega Sage
Mega Sage

You shouldn't need a fix script for this.  First make sure those CIs have a valid Model reference.  This may take care of the problem immediately.  If it doesn't, then go to the Model Category record for Computer and select the Create Assets link.  To prevent further occurrences, make sure that your CIs are assigned a valid Model reference.

CMDBWhisperer_0-1679922936739.png

 


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.

sorry to jump back into this over a year later, CMDB Whisperer, but wanted to make sure that what you stated will not make more issues further down the road.  Not doubting you, but making sure it would fix a similar problem we are having.

Short background, we tried to move to a greenfield instance, but the Hardware side insisted that we needed to import all old existing hardware data (which was in pretty bad shape to begin with, the reason for wanting to start clean)

So now we have a few old asset/ci pairs that are broken.  The asset is not associated with the ci, and visa versa.  On once such issue, we re-tagged the serial number on the asset, and from within the CI created a new Asset (in the Asset tab).  We created the Asset with the proper model and other information, and at the end of the process most of it seems to be working, though the asset field on the CI is still blank and greyed out...

You need to let ServiceNow manage the creation and synchronization of assets and CIs, and the key to doing this successfully is ensuring you are providing a Model which is associated to the appropriate Model Category.   Anything else you do is bound to cause an array of different problems.  It sounds like you might be continuing to propagate some of the original problems.  I strongly suggest following the established out-of-box procedures for creating, linking, and synchronizing CIs and Assets.


The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.

Thanks.  Will look deeper into this before going forward, but on that note, we are seeing some odd things happening.  We are finding that our Hardware models are getting assigned other model categories.  For example, a recently created laptop model was created with only the model category of Computer.  Later on we are now seeing that hardware model now has Windows Server and Linux Server.  This is not an area of SN that I am familiar with, and am curious how that is happening.  Is there an OOB business rule that updates these records?  If so, we need to examine it as it is causing confusion.