title: touch Function in PowerShell
body: <p>I recently added a touch function in PowerShell profile file</p>
  
  <pre><code>PS&gt; notepad $profile
  </code></pre>
  
  <pre class="lang-bsh prettyprint-override"><code>function touch {Set-Content -Path ($args[0]) -Value ($null)}
  </code></pre>
  
  <p>Saved it and ran a test for </p>
  
  <pre><code>touch myfile.txt
  </code></pre>
  
  <p>error returned:</p>
  
  <pre>
  touch : The term 'touch' is not recognized as the name of a cmdlet, function,
  script file, or operable program. Check the spelling of the name, or if a path
  was included, verify that the path is correct and try again.
  At line:1 char:1
  + touch myfile
  + ~~~~~
      + CategoryInfo          : ObjectNotFound: (touch:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </pre>