0 votes

Hello, As part of my offboarding task I need to kick off an export of a users mailbox via Veeam and save the PST file. I have a working script for this but with some mailboxes being well over 50GB in size this can take many hours to complete. If I understand correctly I can set the script to execute asynchronously, it won't time out (?) / I won't get any logging in Adaxes (which is fine). I have a variable in the script to save the results to a folder: <file share>\Offboarding\%username%\Veeam_results.txt" will the script still recoginize the %username% variable if it's run asynchronously? I have scheduled task to read from that folder and log the results / continue if sucessful.

by (120 points)

1 Answer

0 votes
by (14.1k points)

Hello,

If I understand correctly I can set the script to execute asynchronously, it won't time out (?)

No, if the Run a program or PowerShell script action is set to execute asynchronously, the main operation (e.g. the execution of a scheduled task) will not wait until the action is completed. Other actions will continue executing. However, the script will still fail if its execution time exceeds the timeout for scripts execution configured in Adaxes.

I won't get any logging in Adaxes (which is fine)

The corresponding record will be logged in Adaxes after the action set to execute asynchronously is actually executed.

I have a variable in the script to save the results to a folder: <file share>\Offboarding\%username%\Veeam_results.txt" will the script still recoginize the %username% variable if it's run asynchronously?

All value references in all actions and conditions resolve before the conditions are checked and the actions are executed. It does not matter if the action is set to be executed asynchronously or not.

To achieve the required, you need to execute the script in an external PowerShell instance. For details and an example, have a look at the Using Start-Process script from the following repository article: https://www.adaxes.com/script-repository/run-script-in-new-powershell-instance-s290.htm.

Related questions

0 votes
1 answer

I have a scheduled task that runs a custom command that itself has multiple custom commands that run in a specific timed order. I would like the scheduler to run that top level ... , but Command B and C will wait for Command A to finish. Is this possible?

asked Jul 23 by DA-symplr (100 points)
0 votes
1 answer

I am testing a rebuild of our Adaxes configuration. One of the issues I am running into is when using a web selection that involves the modify trigger it takes an ... would have been before the configuration for the front end was in a web interface.

asked Mar 1, 2023 by mobosys (290 points)
0 votes
1 answer

In a business rule, I'd like to pass Adaxes variables into a powershell script that I'll run. For example, pass %username% into the script so it can be used inside the script.

asked Sep 5 by P-Sysadmin (20 points)
0 votes
1 answer

Hello, I have a small question about executing custom commands remotely with powershell. We are now using Adaxes custom commands through orchestrator with remote ... /$UserAD_DN", $NULL, $NULL, 0) $UserAD.ExecuteCustomCommand($command_example) Kr, Serge

asked Oct 12, 2015 by kerremansserge (470 points)
0 votes
1 answer

Hi Support, I would like to run a program on a remote server. I'm trying the follow: Import-Module Adaxes Enter-PSSession-ComputerName S254-020ada1 'C: \ Program ... \ schemusc.exe-config Burkhalter' Unfortunately this does not work. Can you help me there?

asked May 14, 2014 by Napoleon (700 points)
3,548 questions
3,239 answers
8,232 comments
547,814 users