By default, the agent service looks for two PowerShell scripts on the agent machine as it starts and finishes processing the VSS shadow copy and the backup job. These scripts must complete before the backup job will start or finish successfully. If no script is found, the backup process skips the execution of scripts. These scripts are not created on the agent machine by default and must be created manually in order to be used. Once the scripts are created in the following locations, they will be executed by the agent during each backup job.
Pre VSS Shadow Copy
Post VSS Shadow Copy
Please note that if the post transfer script is configured to stop the agent service, the backup will fail as the script will stop the agent and cause it to disconnect prior to the agent validating that the backup completed successfully.