Add a transcript to the script to capture it's activity. See if it generates an error somewhere.
Start-Transcript -Path C:\windows\temp\Myscript.log
Your script code goes here.
Stop-Transcript
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi community!
I am trying to execute an SSIS package in SSMS via SQL Agent. The package is configured to run a Powershell script. Wen I execute the package manually (in Visual Studio 2019 or in the SSISDB catalog), I get the correct results. When I manually execute the PowerShell script itself, I get the correct results.
I have attempted to use a proxy account to run the SQL Agent Job, but I am still not getting the correct results. Does someone have any knowledge or experience with this? I am on SQL Server 2017 CU20, Windows Server 2019, PowerShell 7.2.1.
I have tried mixing and matching other configurations....please help!
Thank you,
Noah
Add a transcript to the script to capture it's activity. See if it generates an error somewhere.
Start-Transcript -Path C:\windows\temp\Myscript.log
Your script code goes here.
Stop-Transcript
Thank you MotoX80. There were no errors recorded. While the transcript was recording information, I executed the SSIS package which executes the PowerShell script and there were no messages in the transcript.
Hey MotoX80,
I did not understand that the Start-Transcript statements go into my PS script...I added the statements to my PS Script and still when I execute the SSIS package via SQL Agent, I am getting the wrong results and no messages between the start and end of the transcript. The below text was copied directly from the transcript output file:
Transcript started, output file is (I removed the file path for security purposes)
PowerShell transcript end
....