1. Macrium Reflect X
  2. Advanced Features and Settings

Generating a PowerShell Source File

To generate a PowerShell file select the Definition Files tab on the main window then right-click on a file and select 'Generate a PowerShell Script File'.

image2021-5-14_13-49-43.png

This opens the PowerShell Script Generation Options dialog:


Output

image2021-5-14_13-51-56.png

Property
Value
Directory

The folder where the source file is saved

Selecting a folder other than the default folder will result in a warning prompting you to ensure the folder is protected from unauthorised access.
The "Do not show this again" option is applied on a per folder basis, therefore selecting different previously unused folders will result in additional warnings.

For more information see here.

File Name The name of the PowerShell source file. This defaults to the XML file name with a ..ps1 extension

Shutdown

image2021-5-14_13-53-55.png

Property
Value
Enable Shut Down Select to enable this property
Shut down The PC will shut down at the end of the backup
Log Off The user will be logged out at the end of the backup

Run Once a Day

image2021-5-14_13-54-29.png

Property
Value
Run Once a Day If selected, will only enable this script to run once per day. This is useful for example if you want a backup to happen at first login or shutdown.

Run Programs

image2021-5-14_13-56-34.png

Property
Value
Run a program or script at the start Select to enable a program or script to run before the backup starts
File Name The path and executable file name
Parameters Optional command line parameters for the program
Run a program or script at the start Select to enable a program or script to run when the backup ends
File Name The path and executable file name
Parameters Optional command line parameters for the program

Elevation

image2021-5-14_13-57-30.png

Property
Value
Enable Elevation If selected will enable UAC elevation for the entire script. This enables functions and programs to run outside the context of Macrium Reflect without requesting further elevation.

Directory Synchronization

image2021-5-14_13-58-6.png

Property
Value
Enable directory synchronization If enabled will use the MS utility RoboCopy to synchronize the backup target directory with the supplied directory.
Directory Enter the folder that you want to synchronize your backup files to

Click 'OK' to generate the PowerShell source file