January 23, 2021 at 8:36 pm
I have a powershell script in remote server. When I go to remote server and execute the script, it works as indented.
When I schedule it to run through SQL server agent, it just says succeeded but code really doesn't do anything.
Any help would be appreciated.
I've attached sql server agent image, how the job is setup.
Am I missing something?
January 24, 2021 at 11:49 am
Are you hoping that the script will execute on the remote server? Or is that just the place where you store PoSh scripts?
January 24, 2021 at 2:09 pm
Yeah, hoping that the script will execute on the remote server.
January 24, 2021 at 2:25 pm
Yeah, hoping that the script will execute on the remote server.
Unfortunately, it won't. It will instead try to execute locally.
But all is not lost, you can use Powershell Remoting to execute PoSh commands on remote servers. Take a look here to get started:
Viewing 4 posts - 1 through 3 (of 3 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