Hello,
I am trying to install the MEMCM 2103 backup using http://thenotoriousdrr.com/index.php/2019/02/01/using-sql-maintenance-plans-to-backup-sccm-cb/
The Site Maintenance Task is failing!!!
Get-ChildItem -Path '\\VRPSCCMMS03\SCCMBackup\UCPBACKUP\CD.latest*.zip' | Where-Object {$_.CreationTime -lt (Get-Date).AddDays(-7)} | Remove-Item | Add-Type -Assembly 'System.IO.Compression.FileSystem' -PassThru | Select -First 1 | % { [IO.Compression.ZIPFile]::CreateFromDirectory('\\VRPSCCMPR01\SMS_UCP\cd.latest', '\\VRPSCCMMS03\SCCMBackup\UCPBackup\CD.latest\CDLatestArchive' + (Get-Date -format 'yyyyMMddHHmm') + '.zip') }
But when doing by powershell the backup works fine but when including it in SQL Agent as a Job it failed
I check the permissions on the folder, on the share and could not find an issue...

Any idea?
Thanks,
Dom
[3]: /answers/storage/attachments/107781-2021-06-21-13-40-00-access-to-cdlatest-folder.png