- Overview
- Managing Backup Script Source Files
- Scheduling Backup Script Source Files
Overview
Macrium Reflect LTSC has the ability to create VBScript, PowerShell, and MS-DOS source files to add pre- and post-backup functionality to backup definitions. These scripts act as a "wrapper" around the backup definition file that executes commands and applications before and after the backup definition file runs.
These scripts enable a host of custom pre- and post-backup operations; some common uses include: synchronizing backups, ejecting USB drives, disconnecting network shares, and more.
The articles linked below contain more information about generating the various script types:
- Generating a VBScript Source File
- Generating an MS-DOS Batch Source File
- Generating a PowerShell Source File
Managing Backup Script Source Files
Once a script source file has been created, it can be viewed and managed in the 'Scripts' tab, nested under the 'Create Backups' tab:
Right-clicking on the script file will display additional options for the script:
Option | Description |
Open Containing Folder | This will open a Windows Explorer window for the containing folder where the script is located. |
Add to list | Select an existing script file (.ps1, .bat, .vbs) to add to the list of script files. |
Edit | Edit the script file using the edit software specified in the Macrium Reflect Defaults and Settings. |
Rename |
Rename the selected script file. Note: This is the recommended process for renaming script files, as renaming through Windows Explorer may prevent Macrium Reflect from finding the renamed script file. |
Delete |
Delete the selected script. An additional window will open, prompting the user to select whether the script is removed from the disk. If the checkbox is left unchecked, the script will be removed from the list on this page but will not be removed from the disk. |
Run Now |
Run the script file now. Hovering over this option will prompt the user to select the type of backup that will run: |
Schedule | Schedule the script file to run automatically. Read more about scheduling a backup script source file here. |
Create a Desktop Shortcut |
Create a desktop shortcut that runs the selected script file. Selecting this option will open an additional window to prompt for the name of the shortcut and the type of backup that will run: |
Scheduling Backup Script Source Files
The backup source script files essentially act as a wrapper around the backup definition file. As a result, scheduling a backup definition file will not run the script. To ensure that the script runs, including the options that were specified in the script, it is important to schedule the script itself and not the backup definition file.
A script file can be scheduled using the 'Schedule' option when right-clicking on a script on the 'Scripts' tab, nested under the 'Create Backups' tab:
In
Select 'Add', then select the type of backup that will be scheduled.
In the window that opens, the 'Frequency' and 'Options' for the schedule can be changed. The list of options on this page will change depending on the 'Frequency' that has been selected:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Selecting 'Conditions' will display additional options that can be used to determine whether the task should run:
Option | Description |
Run task as soon as possible after a scheduled start is missed | If a scheduled start is missed, e.g. due to the system being powered off, the scheduled task will start when it's next possible. |
Start the task only if the computer is on AC power | The task will not start if the computer is on battery power. |
Stop if the computer switches to battery power | If the computer switches to battery power during the clone, the clone will stop. This option is only available if Windows Task Scheduler is selected in the 'Schedule Settings'. |
Wake the computer to run this task |
When selected, the system will attempt to wake from sleep to run the scheduled backup. |
Once the schedule triggers have been configured, select 'OK' to create the schedule:
The created schedule can be viewed, managed, and modified on the 'Scheduled Backups' tab nested under the 'Create Backups' tab:
If the backup definition file that was used to create the script has been previously scheduled, it can be deleted or disabled on this page to prevent duplicate backups from being created.