mandiant / VM-Packages

Chocolatey packages supporting the analysis environment projects FLARE-VM & Commando VM.
Apache License 2.0
123 stars 61 forks source link

Helpers in uninstallation use Stop ErrorActionPreference #1033

Open Ana06 opened 1 month ago

Ana06 commented 1 month ago

Details

We are setting $ErrorActionPreference = 'Continue' in all chocolateyuninstall.ps1 files, but the helper functions seems to use the $ErrorActionPreference = 'Stop in the first line of vm.common.psm1. Some of our helper functions like VM-Uninstall are using -ao 0 to ignore errors (as otherwise they would fail the uninstall), while we would like to get the errors but not fail the uninstallation so that as many steps as possible are performed.