December 15, 2020 at 10:12 pm
HI everyone!
How do i update the script task to run on a specific server. This would change for each run. Or is there another way to run the powershell?
SSIS runs the below:
¤ §unshine ¤
December 16, 2020 at 7:11 pm
Not sure why you are 'copying' powershell to another server - Powershell is a command line utility that should be installed on the servers and updated to the version you require. This is not something you want to be trying to manage through SSIS...
Now - for running commands against other servers, it all depends on the cmdlet and what you are trying to execute. Some (most) cmdlets will have the -ComputerName parameter - so all you need to do is specify the computer name. If you really need to execute a remote script on that server - take a look here: https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1
I am betting there is a much better way of solving your problem - with or without powershell in the mix. It really depends on what you are trying to accomplish in your package.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 18, 2020 at 3:32 pm
Thank you so much. I'm trying to automate sql server configurations. Part is already done by powershell. The powershell executes several scripts. The objective is to have a standard ssis package that can be executed on any new server. If you have any other recommendations, they will be greatly appreciated. I'll check out your link.
Thanks again.
¤ §unshine ¤
December 18, 2020 at 5:46 pm
It still isn't clear what you are trying to accomplish - your explanation is saying you want to copy powershell to another server...why? Powershell should already be installed on the server so there is no reason to 'copy' anything.
You then state you want to run powershell on the other server...and how that is accomplished is going to be based on exactly what you are doing in Powershell. If the commands you are executing have the -ComputerName parameter...then it doesn't matter where it is executed as it will connect to that computer.
Now - if you are copying a set of scripts that must reside on that server and be executed from that server, then it is very easy to copy files to a remote server using Copy-Item - and then to execute them you must use remoting (as outlined in the link provided).
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 18, 2020 at 9:40 pm
Thank you Jeffrey. Your last paragraphs are exactly what i'm trying to do. I will test those. I"m copying ps scripts to the server on which they need to run. I will try your recommendation. Much appreciated!
¤ §unshine ¤
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply