0 votes

I have a custom command that runs a powershell script that works just fine but it takes a long time to run. When I run it on the server as just the powershell script it works, but takes about 6.5 minutes to run. When I run it through the web interface it always seems to timeout and I eventually get an error page. I'm assuming the error page is because the script takes so long to run that the browser eventually times out. Is there anyway to prevent this from happening?

Thanks!

by (520 points)

1 Answer

0 votes
by (18.0k points)

Hello,

You can configure your Custom Command to execute the PowerShell script asynchronously:

  1. Right-click your 'Run script' action and select Edit Action in the context menu.
  2. Enable the Execute asynchronously option for the action.
  3. Save the changes.
0

That worked quite well. Thank you.

0

Have you done exactly the same as given in screen shots ? Does it working now ?

0

Hello Harry,

Have you encountered any issues when implementing the above solution? Did you get any errors?

If you have some questions, issues or errors, please describe them in more detail.

0

I also have a script that takes a while to run. I have tried running it asynchronously but Adaxes still times out after 10 minutes and then the script never completes. Is there any way to increase the time that Adaxes waits for the process to finish?

0

Hello Stuart,

The thing is currently in Adaxes we have a limitation of 10 minutes, during which a PowerShell script should complete. If a script fails to complete within 10 minutes, the operation is cancelled. Currently there is no setting or configuration entry that you can use to increase the time limit.

It is quite strange that a PowerShell script cannot complete in 10 minutes. 10 minutes in more than enough for a PowerShell to complete. Probably, the best way to resolve this issue would be to optimize the script. Can you describe what the script does or send the script to our support email (adaxes@softerra.com)?

Related questions

0 votes
1 answer

I have a number of custom Powershell scripts that add users to Teams, groups, etc. I re-use these scripts dozens of times for different conditions and only change one ... possible to convert this script to a custom command and pass parameters to it instead?

asked Dec 16, 2024 by cwyant-hfg (40 points)
0 votes
1 answer

Dear, I'm having issue in adding a group to a Business Unit. The situation is as following: We have given our IT ServiceDesk access to manage certain groups. This is ... Unit.", "Information") Can you please verify what is preventing the addition? Thank you.

asked Nov 29, 2024 by alexalex (40 points)
0 votes
1 answer

Is there a way to configure a Custom Command parameter to accept multiple values so I can then add them to a multi value attribute such as adm-CustomAttributeObjectMultiValue1 ... in my specific case I'm looking to use a directory object picker parameter

asked Nov 27, 2024 by AM (50 points)
0 votes
1 answer

We have a series of transforms we use for users including moving to different OU's. Is there a way to open the user's object after the command completes much in the same way a user creation does?

asked Nov 22, 2024 by msheppard (720 points)
0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked Nov 22, 2024 by msheppard (720 points)
3,614 questions
3,301 answers
8,366 comments
548,572 users