I am unable to trigger powershell scripts via BODS when the BODS service is run on a Service Account. I also placed the powershell script into a .bat file and tried calling the .bat file via BODS Script which also doesn’t work.
I ve also tried setting all the execution policies, by all were in vain.
Please suggest on how to execute the PowerShell scripts on BODS via Service Account.
Version of BODS : BODS 4.1 SP2
Many thanks for the guidance. The posts on the link supplied was helpful to know that 256 flag needs to supplied to make the job complete. I can now make my job complete by supplying 256.
But the real problem is that I am not getting the expected output though the job completes by returning NULL.Ideally it has to return 0 when it succeeds.
I am unzipping files by means of powershell Script. The .PS1 file is called via a script on BODS that is running via Service Account. As said earlier, this work perfectly fine when the services are run on Local System account or when the scripts are run on CMD.
Many thanks for the guidance. The posts on the link supplied was helpful to know that 256 flag needs to supplied to make the job complete. I can now make my job complete by supplying 256.
But the real problem is that I am not getting the expected output though the job completes by returning NULL.Ideally it has to return 0 when it succeeds.
I am unzipping files by means of powershell Script. The .PS1 file is called via a script on BODS that is running via Service Account. As said earlier, this work perfectly fine when the services are run on Local System account or when the scripts are run on CMD.
The 256 flag is a fire-and-forget call. All you’ll get back is a response indicating if the command line worked or not and it returns immediately. You’ll have to route the output of the PowerShell script to a file and then in your Data Services script poll for the file, or for a value in the file to indicate that the script is complete.
Thanks. I have now modified my script to pass output into a file and then I am calling the return code from the file. This outputs an empty file and returns NULL.
This again indicates that the powershell script has not worked via BODS on service account.
Is there any additional stuff that needs to be done to make powershell work via BODS which runs via a system account.?Please guide.
Alternatively, change the Job Server service to run under a network account. A local account works fine also. In the long run, changing the owner of the service is the best way to go.
The scenario is the reverse;
BODS services on Local System account works fine for powershell.
It doesn’t work only when the BODS service is run via a network account. Image attached showing that the BODS Service is running via network account.