title: Editing and merging xml files without modification of input files
body: <p>My task is to merge two xml files together. Before merging these two files, I need to remove the first line of the second file. I was able to receive the needed output file by writing these two lines:</p>
  
  <pre><code>#case if both files exists - remove first line from the file
  (Get-Content $JfilePath | Select-Object -Skip 1) | Set-Content $JfilePath
  
  #mergeFiles together
  Get-Content $MfilePath, $JfilePath | Set-Content $mergedFile
  </code></pre>
  
  <p>The issue is that I am modifying the second file by executing the first cmdlet. I would like to keep both files in original form. I dont want to also create any temporary files.
  I was trying to perform the following:</p>
  
  <pre><code> Get-Content $MfilePath, (Get-Content $JfilePath | Select-Object -Skip 1) | Set-Content $mergedFile
  </code></pre>
  
  <p>but I received the error:</p>
  
  <pre><code>Get-Content : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'LiteralPath'. Specified method is not supported.
  </code></pre>
  
  <p>Could you please help how the output file could be received without modifying these input files?</p>