windows-script.ps1 (10 lines of code) (raw):
$filePath = "C:\Program Files (x86)\Microsoft Azure Site Recovery\agent\Application Data\etc\RcmProtectionState.json"
if ( -not (Test-Path $filePath) )
{
Write-Host "file $filePath not found."
exit
}
Stop-Service svagents
cd "C:\Program Files (x86)\Microsoft Azure Site Recovery\agent\Application Data\etc"
del RcmProtectionState.json
Start-Service svagents