When you customize the Pattern Windows OS - Desktops to choose a specific serial number to add to the cmdb for the CI in Discovery, it does not work. It always inserts the first serial number that is found. (This is Step 5 of the Pattern: Insert Serial Number to cmdb_ci_computer - the value field in this step specifies an array element number-$cmdb_serial_number[1].serial_number. Changing it to element 2 does not work.) 




The Pre/Post Processor Script for the Windows OS - Desktops Pattern contains a line of code that overrides the settings in the pattern and will always write element[1] of the array of serial numbers to the cmdb CI item that is discovered


  1. Navigate to the Pre/Post Processor Script for the Windows OS - Desktops Pattern: https://<instance_name>
  2. Comment out Line 198 where it reads "handleWindowsHardwareInformation();"
  3. Modify the array element described in the "Symptoms" section of this article to match the serial number you desire to associate with the CI. *You can always look in the payload of the Pattern to determine which array element your desired serial number is.
  4. Save and publish the pattern and do a to make sure the changes take effect.
  5. Run the Discovery


Article Information

Last Updated:2019-08-02 20:45:32