Duplicate file name error occurs during update of Credentials.psm1 file synchronized by both Discovery and OrchestrationDescription<!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} --> <!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} --> If both Discovery and Orchestration have synchronized versions of the Credentials.psm1 file existing in different paths, any attempt by either application to update their version of the file results in a duplicate file error. <!-- p.p1 {margin: 0.0px 0.0px 11.0px 0.0px; line-height: 13.0px; font: 11.0px Verdana; color: #000000; -webkit-text-stroke: #000000} span.s1 {font-kerning: none} --> The business rule "Prevent Duplicate,Spaces & Colon in name" is intended to prevent duplicate filenames, so that synchronized MID Server script files won't overwrite each other. However, the business rule incorrectly compares the file names only and does not recognize that the two script files have different paths.Steps to Reproduce Synchronize the Credentials.psm1 file for both Discovery and Orchestration in different paths.Try to update the Credentials.psm1 for either of the applications.Note the duplicate file name error. For more information, see the Credentials.psm1 section in the product documentation topic MID Server PowerShell files.Workaround<!-- ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Use one of the following workarounds: Disable (perhaps temporarily) the "Prevent Duplicate,Spaces & Colon in name" business rule. Update the business rule to evaluate both the path and the file name by replacing lines 29 to 32 of the business rule with the following code: while(gr.next()){ var path1 = getPath(current, 0); var path2 = getPath(gr, 0); if(path1==path2){ current.setAbortAction(true); gs.addErrorMessage(gs.getMessage("Duplicate file name with same path is not allowed ")); } } function getPath(scriptRecord, level) { var parentField = "parent"; for(var i=0;i<level;i++){ parentField = parentField + ".parent"; } var parent = scriptRecord.getDisplayValue(parentField); var path = ""; if(parent){ path = getPath(scriptRecord,++level)+"/"+parent; } return path; } Related Problem: PRB934605