title: Error with Get-Content
body: <p>I have the following portion of code:</p>
  
  <pre><code>$fileList | foreach {
  Write-Host ". . . adding $_ to script"
  $myCreateScript += Get-Content "$ScriptRoot\$_" | Out-String }
  </code></pre>
  
  <p>That produces the following toward the end of execution:</p>
  
  <blockquote>
    <p>ItemNotFound,Microsoft.PowerShell.Commands.GetContentCommand
    System.Exception: An object at the specified path E:\Scripts\users[[FILE_NAME_LOWER]]_administrator.sql does not exist, or has been filtered by the -Include or -Exclude parameter.</p>
  </blockquote>
  
  <p>[[FILE_NAME_LOWER]]_administrator.sql is the name of the file, and it does exist in the specified directory. If this is a problem with the fact that the filename contains brackets ([]), I need to know how to resolve it within the foreach block, as I cannot easily change the filenames (they are used elsewhere in code that is in source control) and because of prior code in the script, need to be preserved in $fileList. I suspect the brackets are the issue, because $fileList has over 200 rows, and $myCreateScript gets populated with the correct data up to this point.</p>