From 81bbde43abfa9f9ac8f0bfd370f5f19891a86a22 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Wed, 1 Nov 2023 15:51:24 -0400 Subject: [PATCH] fix Expand-Archive --- Tools.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools.ps1 b/Tools.ps1 index 2b5012f..7c56529 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -655,6 +655,7 @@ Function Expand-Archive { If ( [System.IO.Path]::GetExtension($Path) -ne ".zip" ) { Write-Output "The path specified is not a zip file: ""${Path}""" ; Exit } If ( [string]::IsNullOrEmpty($DestinationPath) ) { $DestinationPath = Split-Path -Parent $Path } Try { + Add-Type -Assembly "System.IO.Compression" Add-Type -Assembly "System.IO.Compression.FileSystem" Write-Output "Extracting ""${Path}"" to ""${DestinationPath}""" [System.IO.Compression.ZipArchive]$SourceArchive = [System.IO.Compression.ZipFile]::Open($Path, [System.IO.Compression.ZipArchiveMode]::Read)