title: Wildcards in variable path with Powershell
body: <p>I would like in my script to use wildcard in variable like this :</p>
  
  <pre><code>$TARGET = "\\MACHINE1\c$\ProgramData\Test\12.*\Data\"
  </code></pre>
  
  <p>The problem is $TARGET returns </p>
  
  <pre><code>\\MACHINE1\c$\ProgramData\Test\12.*\Data\
  </code></pre>
  
  <p>and not</p>
  
  <pre><code>\\MACHINE1\c$\ProgramData\Test\12.1.1.1\Data\
  </code></pre>
  
  <p>However </p>
  
  <pre><code>Test-Path "\\MACHINE1\c$\ProgramData\Test\12.*\Data\"
  
  =&gt; TRUE
  </code></pre>
  
  <p>Thanks for your help</p>