title: Select/map each item of a Powershell array to a new array
body: <p>I have an array of file names in Powershell, and I would like to prepend a path to each of them and get the result in a new array.</p>
  <p>In C# I could do this using Linq...</p>
  <pre class="lang-csharp prettyprint-override"><code>var files = new string[] { &quot;file1.txt&quot;, &quot;file2.txt&quot; };
  var path = @&quot;c:\temp\&quot;;
  var filesWithPath = files.Select(f =&gt; path + f).ToArray();
  </code></pre>
  <p>But what is the idiomatic way to do this in Powershell? It looks like there is a foreach syntax I could use, but I figure there must be a more concise, functional way to do it.</p>