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

Hi team, we have a basic approval setup for a specific group I would like to bypass this, in case a specific custom command is executed and trying to add a member to this group ... ? I tried to play around with "If the initiator is xxx" but had no success yet.

asked Apr 10 by wintec01 (1.8k points)
0 votes
1 answer

We currently have a custom command implemented that sends a remove passcode command to a DEP managed iOS device. The script works fine when testing in the Adminstration console, ... { $Context.LogMessage("Failing to send Wipe command", "Warning") return } }

asked Feb 11 by alexalex (60 points)
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 (60 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)
3,677 questions
3,361 answers
8,494 comments
549,308 users