web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

PowerShell to start a Batch

(0) ShareShare
ReportReport
Posted on by 65

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

I have the same question (0)
  • Mea_ Profile Picture
    60,286 on at

    Hi Prateep Ghosh,

    It's a vary strange requirement, why do you need this at all ?

  • Prateep Ghosh Profile Picture
    65 on at

    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?

  • Rudi Hansen Profile Picture
    4,079 on at

    No I do not see any way of doing this.

    AX Does not have any default way of managing Batch jobs from powershell.

  • Prateep Ghosh Profile Picture
    65 on at

    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?

  • Jie G Profile Picture
    Microsoft Employee on at

    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#.

  • Prateep Ghosh Profile Picture
    65 on at

    Okay.

    Thanks a lot Rudi.

  • Prateep Ghosh Profile Picture
    65 on at

    Hi Ada,

    It would be great help if you can help me understand how this is done with an example or any link.

    Thanks.

  • Verified answer
    Rudi Hansen Profile Picture
    4,079 on at

    [quote user=""Prateep"][/quote]

    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?

    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.

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    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]

  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans