We need to change the number of restore points for multiple disk jobs before the start of a tape job and need to change it back again to the old value after the tape job has finished. We want to use pre-backup and post-backup scripts to start PowerShell to do this for us without any user input. I found this code on the forum but it requires input:
Schedule this script as both pre and post job activities. Just make sure to change the retaincycles value in accordance with your needs. This script changes retention settings for all existing backup jobs: