Tag Archives: powershell

Update to quick one-liner Windows unzips

So this one is taken from https://blogs.msdn.microsoft.com/daiken/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget/

echo $zipfilename=$args[0]; $destination=$args[1];if(test-path($zipfilename)) {$shellApplication = new-object -com shell.application;$zipPackage = $shellApplication.NameSpace($zipfilename);$destinationFolder = $shellApplication.NameSpace($destination); $destinationFolder.CopyHere($zipPackage.Items()); };>unzip.ps1

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File unzip.ps1 %FullPathToZip% %FullPathToTarget%

This was tested on PSv2.