Backup Exchange 2010 Retryable Error

Context :
Everybody that has worked with Exchange 2010/2013 is familiar with A backup failure where the most common is a writer error.
When you type


It will list back something like this :

Writer name: 'Microsoft Exchange Replica Writer' Writer Id: {75dfb225-e2e4-4d39-9ac9-ffaff65ddf06} Writer Instance Id: {088e7a7d-09a8-4cc6-a609-ad90e75ddc93} State: [1] Stable Last error: Retryable error

Resolution :
Restart whatever Service that corresponds with the failed writer :

VSS Writer Service Name Service Display Name
ASR Writer VSS Volume Shadow Copy
BITS Writer BITS Background Intelligent Transfer Service
COM+ REGDB Writer VSS Volume Shadow Copy
DFS Replication service writer DFSR DFS Replication
DHCP Jet Writer DHCPServer DHCP Server
FRS Writer NtFrs File Replication
FSRM writer srmsvc File Server Resource Manager
IIS Config Writer AppHostSvc Application Host Helper Service
IIS Metabase Writer IISADMIN IIS Admin Service
Microsoft Exchange Writer
Microsoft Exchange Writer
Microsoft Exchange Information Store
Microsoft Exchange Replication
Microsoft Hyper-V VSS Writer vmms Hyper-V Virtual Machine Management
NTDS NTDS Active Directory Domain Services
OSearch VSS Writer OSearch Office SharePoint Server Search
OSearch14 VSS Writer OSearch14 SharePoint Server Search 14
Registry Writer VSS Volume Shadow Copy
Shadow Copy Optimization Writer VSS Volume Shadow Copy
SPSearch VSS Writer SPSearch Windows SharePoint Services Search
SPSearch4 VSS Writer SPSearch4 SharePoint Foundation Search V4
SqlServerWriter SQLWriter SQL Server VSS Writer
System Writer CryptSvc Cryptographic Services
TermServLicensing TermServLicensing Remote Desktop Licensing
WMI Writer Winmgmt Windows Management Instrumentation

My Exchange backup failed while running either DPM or Avamar or BackupExec or Veeam.
A retryable error on the “Microsoft Exchange Replica Writer”
Quick script i made:

get-service "MSExchangeRepl" | restart-service

Elaborate version i scheduled 10 minutes before planned backup:

Add-PSSnapin 'Microsoft.Exchange.Management.PowerShell.E2010'

$Servers = Get-ExchangeServer | where {$_.ServerRole -match 'Mailbox'}
ForEach ($server in $servers)
Restart-Service -InputObject $(Get-Service -Computer $server -Name MSExchangeRepl);
Invoke-Command -ComputerName $server -ScriptBlock {
Import-Module WebAdministration
Restart-WebAppPool MSExchangePowerShellAppPool
Restart-WebAppPool MSExchangePowerShellProxyAppPool
Restart-WebAppPool DefaultAppPool

This script does not only restart that nasty Replication writer, but also clears the powershell AppPools and the normal AppPool where most backup products execute powershell on the target server.