Hello,
I googled for like an hour now w/o a satisfying answer. So short question: Is it meanwhile possible to pass parameters and/or access variables from pre- and post-scripts?
I know there is the awkward approach of calling the parent-process to get these information, but I really hope that the interface has made some progress since that days.
So, is there any helpful in v13 to be able to get fancy things like job-name and items from within the scripts?
If not, is that feature-wish on the agenda of any near upcoming versions?
Many thanks in advance.
-
CKNorth
- Novice
- Posts: 8
- Liked: 13 times
- Joined: Sep 04, 2024 1:24 pm
- Full Name: Christian Keck
- Contact:
-
david.domask
- Product Manager
- Posts: 3618
- Liked: 876 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Params/variables/jobs-names in pre- and post-scripts?
Hi CKNorth,
Pass arguments? Yes, you can do this with Pre / Post-Job scripts today.
Pre-made variables? No, at this time there are no variables you can set to pass to pre / post-job scripts (same for pre-freeze / post-thaw)
Veeam doesn't really do anything "special" with such scripts, the script is executed as-is; here's what is actually executed with a pre-job script:
So nothing more than just executing the script natively.
Can you share a bit more on what you're doing with pre / post-job scripts and what you want to fetch? As a workaround as noted you CAN pass arguments to pre-job and post-job scripts (not for pre-freeze / post-thaw currently) as you can see in the example above, so depending on what you're trying to do, you might be able to pass the job's UUID or some shorted unique ID that the script uses to get info on the job.
Pass arguments? Yes, you can do this with Pre / Post-Job scripts today.
Pre-made variables? No, at this time there are no variables you can set to pass to pre / post-job scripts (same for pre-freeze / post-thaw)
Veeam doesn't really do anything "special" with such scripts, the script is executed as-is; here's what is actually executed with a pre-job script:
Code: Select all
[28.04.2025 15:13:15.031] <01> Info (3) Executing custom command [powershell.exe], arguments [ -ExecutionPolicy ByPass -Command " try {& 'C:\Users\Administrator\Downloads\hibye.ps1' -Custom "blueberry" -ErrorAction Stop } catch { exit 1 } "]Can you share a bit more on what you're doing with pre / post-job scripts and what you want to fetch? As a workaround as noted you CAN pass arguments to pre-job and post-job scripts (not for pre-freeze / post-thaw currently) as you can see in the example above, so depending on what you're trying to do, you might be able to pass the job's UUID or some shorted unique ID that the script uses to get info on the job.
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: Google [Bot], joecruz and 583 guests