May 16, 2022 at 8:00 pm
I created a sql job and have multiple powershell steps. Powershell step runs query on databases hosted on different servers. This has always worked for me and able to query databases and export data to csv files. This is first time I am running into an issue where it will only export 1 row and skip all other rows even.
Powershell code works fine when I run it from Powershell ISE. It only acts weird when I run it as powershell step in the sql job.
May 17, 2022 at 8:57 am
This was removed by the editor as SPAM
May 17, 2022 at 8:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
May 18, 2022 at 10:45 am
Hard to tell without code and output given.
July 4, 2022 at 9:41 am
This was removed by the editor as SPAM
December 19, 2022 at 3:05 pm
I created a sql job and have multiple powershell steps. Powershell step runs query on databases hosted on different servers. This has always worked for me and able to query databases and export data to csv files. This is first time I am running into an issue where it will only export 1 row and skip all other rows even.
Powershell code works fine when I run it from Powershell ISE. It only acts weird when I run it as powershell step in the sql job.
I got this,...
December 19, 2022 at 4:40 pm
One thing to be careful of is the version of PoSh in the SQL job might be different than what you see in the ISE. Different profile, version modules, etc.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply