Mid Server PowerShell script files are not sync properly in ServiceNowIssue PowerShell script files are not sync properly between Mid server to ServiceNow.Some files are deleted automatically. Below logs can be seen in the MID server agent log file;2023-11-07 17:34:09 INFO (FileSync:ecc_agent_script_file) [FileDirectoryHelper:50] Deleting D:\Mid Server\agent\scripts\PowerShell\AD\file1.xml2023-11-07 17:34:09 INFO (FileSync:ecc_agent_script_file) [FileDirectoryHelper:50] Deleting D:\Mid Server\agent\scripts\PowerShell\AD\file2.csv2023-11-07 17:34:09 INFO (FileSync:ecc_agent_script_file) [FileDirectoryHelper:50] Deleting D:\Mid Server\agent\scripts\PowerShell\AD\file3.logCauseMID server script files only syc's only in one direction and that is from instance (from 'ecc_agent_script') to the mid server target script folder. For example: If you put any script file in below path on instance (Parent is 'AD'), it will get sych to '\agent\scripts\PowerShell\AD\' on MID server https://instancename.service-now.com/ecc_agent_script_file_list.do?sysparm_query=parent%3Dc135409d377101006b882d465abe5d71&sysparm_first_row=1&sysparm_view= ***Note: Any file you directly put in '\agent\scripts\.." on MID server, it will eventually get deleted from this path after syc operation happens on the MID serverResolutionDo not put any file in ' '\agent\scripts\.." on MID serverYou should always add files in 'ecc_agent_script_file' table on instance which you wanted to get syced to MID server.Refer below ServiceNow documentation for more details; Attach a script file to a file synchronized MID Server https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/mid-server/task/mid-server-script-attach.html#mid-server-script-attach