title: PowerShell script to list files from sftp server folder
body: <p>I am trying to get list of files from an SFTP folder using the following PowerShell script:</p>
  <pre><code>$files = Get-SftpChildItem -Host mysftpserver -Port 22 -Username myusername -Password mypassword -RemoteLocation &quot;/MySFTPFolder/outbound/&quot;
  ForEach ($f in $files)
  {
      &quot;test&quot; | Out-File $ConfigFile -Append
  }
  </code></pre>
  <p>For some reason I am not able to read the 2 files that are in the remote outbound folder. Is there something I am missing?</p>