From a42d025eea1cdc746005d1611c7a4d7911d4d681 Mon Sep 17 00:00:00 2001 From: Ana Maria Martinez Gomez Date: Mon, 16 Dec 2024 09:29:06 +0100 Subject: [PATCH] Fix VM-Unzip-Recursively Prevent `VM-Unzip-Recursively` to fail setting the error action preference to `Continue` inside the function (instead of `Error` as set at the beginning of the file) as we are handling errors inside the function. --- packages/common.vm/common.vm.nuspec | 2 +- packages/common.vm/tools/vm.common/vm.common.psm1 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/common.vm/common.vm.nuspec b/packages/common.vm/common.vm.nuspec index 1f8934e6..e0e3d673 100755 --- a/packages/common.vm/common.vm.nuspec +++ b/packages/common.vm/common.vm.nuspec @@ -2,7 +2,7 @@ common.vm - 0.0.0.20241209 + 0.0.0.20241216 Common libraries for VM-packages Mandiant diff --git a/packages/common.vm/tools/vm.common/vm.common.psm1 b/packages/common.vm/tools/vm.common/vm.common.psm1 index 9f8325a5..e18ee80a 100755 --- a/packages/common.vm/tools/vm.common/vm.common.psm1 +++ b/packages/common.vm/tools/vm.common/vm.common.psm1 @@ -1828,6 +1828,7 @@ function VM-Create-Ico { # Delete extracted ZIPS after unzipping them. # Useful to extract zipped labs downloaded from GDrive keeping the folder structure. function VM-Unzip-Recursively { + $ErrorActionPreference = 'Continue' $desktop = Join-Path ${Env:UserProfile} "Desktop" $zip = Get-Item "$desktop\drive-download*.zip" if (-Not (Test-Path $zip)) {