[
  {
    "Id": "724360",
    "ThreadId": "285952",
    "Html": "<p>Why is the Unzip process so slow in powershell? Is there something I can do to speed it up? It took close to 40 minutes to unzip 3 files with a size of 111mb, 622mb, and 520mb.</p>\n<p>&nbsp;</p>\n<p>function UnZipMe {<br /> &nbsp;&nbsp;&nbsp; param($SourceFile,<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $unzipDir)<br /> &nbsp;&nbsp;&nbsp; <br /> &nbsp;&nbsp;&nbsp; $shell=new-object -com shell.application<br /> &nbsp;&nbsp;&nbsp; $CurrentLocation = $SourceFile<br /> &nbsp;&nbsp;&nbsp; $Location=$shell.namespace($unzipDir)<br /> &nbsp;&nbsp;&nbsp; $ZipFiles = get-childitem -Path $CurrentLocation'\\*.zip'<br /> &nbsp;&nbsp;&nbsp; $ZipFiles.count | out-default<br /> <br /> &nbsp;&nbsp;&nbsp; foreach ($ZipFile in $ZipFiles) {<br /> <br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ZipFile.fullname | out-default<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $zipfile = [Ionic.Zip.ZipFile]::Read($ZipFile)<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $zipfile | % { $_.Extract($unzipDir) }<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $zipfile.Dispose()<br /> &nbsp;&nbsp;&nbsp; }<br /> }</p>\n<p>&nbsp;</p>\n<p>&nbsp;Add-Type -Path $Tmp_Dir'\\DotNet\\zip-v1.9-Reduced\\Release\\Ionic.Zip.Reduced.dll'&nbsp;&nbsp;&nbsp; <br /> UnZipMe $source $destination</p>\n<div id=\"_mcePaste\" style=\"left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">&nbsp;&nbsp;&nbsp; Add-Type -Path $Tmp_Dir'\\DotNet\\zip-v1.9-Reduced\\Release\\Ionic.Zip.Reduced.dll'&nbsp;&nbsp;&nbsp;</div>",
    "PostedDate": "2012-01-12T09:54:58.747-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]