title: Powershell Putty Connection and Automating Tasks
body: <p>I want to use PowerShell to connect to a PuTTY "saved session" and then specify a file that contains some batch commands.  Using CMD this would look like</p>
  
  <pre><code>d:\putty\psftp 'Saved Session Name' -b d:\location.txt.
  </code></pre>
  
  <p>I think that the PS equivalent should look like</p>
  
  <pre><code>Start-Process d:\putty\psftp.exe 'Saved Session Name' 
  (and then a call to pass a 'get' script) i.e. cd Outgoing get &lt;date&gt;.txt 
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <pre><code>a positional parameter cannot be found that accepts the argument
  </code></pre>
  
  <p>How can I accomplish this using PowerShell?</p>