title: Powershell: Add function into command line without variable
body: <p>Is it somehow possible in powershell to skip variables and include the driveletter function directly in the path of executing the command?</p>
  <pre><code>. (Get-Volume -FileSystemLabel myHDD).DriveLetter:\temp\ps.ps1
  </code></pre>
  <p>The command should look like:</p>
  <p>. D:\temp\ps.ps1</p>
  <p>When I run it in powershell, I get this error:</p>
  <pre><code>. : The term 'D' 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.
  </code></pre>
  <p>At line:1 char:3</p>
  <ul>
  <li>. (Get-Volume -FileSystemLabel myHDD).DriveLetter:\temp ...</li>
  <li>
  <pre><code>+ CategoryInfo          : ObjectNotFound: (D:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException
  
  </code></pre>
  </li>
  </ul>
  <p>Thanks for your help!</p>