title: Powershell calling function with argument as string
body: <p>I am trying to call <code>Get-ChildItem</code> function from custom function. The problem is the arguments to the function can be dynamic.</p>
  
  <pre><code>function Test {
      Get-ChildItem $Args
  }
  </code></pre>
  
  <p>When I try</p>
  
  <pre><code>Test .\    //this works as Path is taken as default argument value
  Test .\ -Force //this doesn't work as expected as it still tries to consider entire thing as Path
  Test -Path .\ -Force //same error
  </code></pre>
  
  <p>How to <code>wrap around function</code> and <code>pass the arguments as it's</code>?</p>