title: SSIS runs package that runs powershell script but SSMS don't
body: <p>I have a package on SSIS that executes a .BAT file that consequently executes a PowerShell file, which brings the file metadata from a folder, generating a CSV file.</p>
  <p>I already granted access to the folder for the SQL Server Agent user, but it didn't work.</p>
  <p>When I run the package on SSIS, it works correctly! However, if I execute the same package through a JOB in SSMS, it ends the step, but the .BAT file was not executed, or if it was, the Powershell file did not, because after the execution the CSV file is &quot;1kb&quot;, no data.</p>
  <p>Am I forgetting something?</p>
  <p>SSIS package (portuguese language):</p>
  <p><a href="https://i.stack.imgur.com/nfA6V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nfA6V.png" alt="enter image description here" /></a></p>
  <p>[EDIT 1]</p>
  <p>A strange thing that I noticed, was that we have 3 packages scheduled by SSMS, but only one of them that doesn't work, which is the one mentioned in the question. But I can't find out why or what the difference is to others.</p>
  <p>2 packages extract information from Sharepoint and work on SSMS, but this other package that extracts metadata from files does not.</p>