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?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
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:
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply