add Genetec dump files to cleanup script

copy AMP to Install-EmberkomBackup script
This commit is contained in:
2020-11-18 16:42:34 -05:00
parent 32b7b49dcd
commit c08383272d
2 changed files with 39 additions and 1 deletions
+9
View File
@@ -52,6 +52,15 @@ If ( IsAdmin )
Try { Start-Process "powercfg" -ArgumentList "-h off" -Wait }
Catch { LogErr $_.Exception.Message }
}
## Remove Genetec application crash dumps
$GenetecCrashDumps = Get-ChildItem -Path "${Env:ProgramData}\Genetec\Dumps" | Where { $_.Name -match "^.*_Crash$" }
If ( $GenetecCrashDumps )
{
LogMsg "Deleting Genetec application crash dumps"
Try { ForEach ( $dump in $GenetecCrashDumps ) { Remove-Item $dump -Force -Recurse -ErrorAction SilentlyContinue } }
Catch { LogErr $_.Exception.Message }
}
}
## Only run this section if we don't have administrative privileges