Stop Powershell from opening when running SSIS package

Manny 151 Reputation points
2022-01-31T01:30:45.32+00:00

Hi

I am using PowerShell to automate some file work in SSIS. When I run the task in SSIS it runs fine but for a brief second I see the Powershell window open and close very quickly. Is there a way to stop that from happening? The script I have is below:

Get-ChildItem 'C:\Users\Me\ZipFolder' -Filter *.zip | 
    Expand-Archive -DestinationPath 'C:\Users\Me\Temp_Files' -Force

Thank you

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,431 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,416 Reputation points
    2022-01-31T02:30:57.96+00:00

    I suppose that would depend on how SSIS runs your script. If they launch Powershell they can use the "-WindowStyle Hidden" parameter, but that's on SSIS.