August 15, 2019 at 3:31 pm
is there a way to run command below in tsql, runs from powershell fine (xpcmdshell is on)
exec xp_cmdshell 'powershell ""compress-archive -Path c:\media\dm1210.csv -DestinationPath c:\media\dmtim.zip""'
August 16, 2019 at 4:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
August 16, 2019 at 6:11 pm
Probably the easiest way to do it would be to have a SQL Agent job with your PowerShell code in it (a SQL Agent step can be PowerShell) and then use msdb.dbo.sp_start_job in your stored procedure to run that.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy