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 (11.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 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

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)
0 votes
1 answer

Why is the "Execute asynchronously (the main operation does not wait...)" option disabled for Send e-mail notification action? Is it because email is always sent asynchronously? ... set it as asynchronous is also disabled. Is there a way to work around this?

asked Apr 8, 2014 by sdavidson (730 points)
0 votes
1 answer

I have seen object Adaxes variables such as adm-DirectMemberOfGuid and adm-O365ObjectId. Are these adx- variables listed in documentation somewhere? I could not find them in the Adaxes SDK documentation.

asked Dec 12, 2022 by Viajaz (210 points)
3,351 questions
3,052 answers
7,791 comments
545,086 users