Notifications
Announcements
No record found.
Hi,
Is there a way to start a batch process using PowerShell command?
If yes, could anyone help me with the code?
Thanks.
*This post is locked for comments
Hi Prateep Ghosh,
It's a vary strange requirement, why do you need this at all ?
Hi Ievgen,
The client wants to reconfigure all the existing batch jobs currently running on the Production environment to a new environment with a different user id.
So instead of manually starting all the batch processes with the new id, we wanted to know if there is a way to start all the batch jobs from PowerShell directly?
No I do not see any way of doing this.
AX Does not have any default way of managing Batch jobs from powershell.
Hi Rudi,
The current environment has several batches which are running using different user ids and not any one id in particular.
The requirement is to create a single user account which will be used for running all batch jobs specifically.
So once we have created a new id in the system and added the same to AX. We wanted to know if there is a way to start all the batch jobs from PowerShell directly?
Hi Prateep,
Yes, it is possible to start a batch process in PowerShell. There is no existing command to be used to do that, you need to call the related methods in the .Net assemblies, just as you do this via C#.
Okay.
Thanks a lot Rudi.
Hi Ada,
It would be great help if you can help me understand how this is done with an example or any link.
[quote user=""Prateep"][/quote]
In this case your problem would be that you might have a lot of different batch jobs you would need to create again.So I do not think this is the way to do this.
I would instead change the value of the field EXECUTEDBY in the BATCH table, directly from SQL.
AX has it's own language using it you can solve this task easily. You can do this from SQL as well [View:https://community.dynamics.com/ax/b/briannormantechtips/archive/2017/04/19/modify-a-batch-job-39-s-created-by-user-after-it-is-saved]
I would agree to put batch jobs on Hold and update information from SQL server. once done reset back status to waiting. SID of users are not saved in batch tables.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2