Skip to main content

TIH 2019 Protection question

Thread needs solution

I have a PowerShell script invoked by a post-backup cmd script that needs write access to the \ProgramData\Acronis\TrueImageHome\Scripts \*.tib.tis files. I've tried adding various processes (PowerShell.exe, cmd.exe, and the ps1 script) to the protection monitored processes list with no success. What do I need to do to allow my script permission to do what it needs to do?

I know it's a TIH Protection issue because turning off monitoring works, but that's a manual process and backups are worthless to me if they aren't fully automated. Is there a command or PS method to disable/enable protection? I'd like to keep the protection feature active but I do need to allow exceptions.

0 Users found this helpful

D, you need to do something along the lines of my small Powershell script below, which turns off Acronis Active Protection to allow deleting old .tib files, then turns AAP back on again.

$testfiles = "L:\Test\WINPE_inc_b?_s6_*.tib"
$taskfiles = "L:\Test\WINPE_*.tib"

if (test-path $testfiles) {
write-host "$taskfiles found"
sc stop "AcronisActiveProtectionService"
remove-item $taskfiles
write-host "$taskfiles deleted"
sc start "AcronisActiveProtectionService"}

@Steve, Thanks for the fast response! I'll give that a try next chance I get.

@Steve, Apparently your "sc" alias isn't the standard Set-Content command that's distributed with Windows 10. What is it an alias for? I guess that's why Best Practices say to not use aliases in scripts...

D, sc start is actually a Windows command but you can try using the Start-Service / Stop-Service Powershell equivalents.

See webpage: Difference between sc start … and Start-Service … in PowerShell 2

I haven't had any issues when using the Windows sc start/stop commands in my scripts but this could be machine dependent?

DUH! Of course it's a cmd script and not PS. Guess I've been too wrapped up in learning PS and it's warped my mind. Sorry for just skimming and not reading carefully. Thanks again, especially for your patience and expanded answer.