Skip to content

Instantly share code, notes, and snippets.

@petems
Created March 10, 2016 14:33
Show Gist options
  • Save petems/ab6ea60ef14718071204 to your computer and use it in GitHub Desktop.
Save petems/ab6ea60ef14718071204 to your computer and use it in GitHub Desktop.
archive { 'C:\Temp\':
path => 'C:\',
source => 'http://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.0.M3/bin/apache-tomcat-9.0.0.M3.zip',
checksum => 'f2aaf16f5e421b97513c502c03c117fab6569076',
checksum_type => 'sha1',
extract => true,
extract_path => 'C:\Temp',
creates => 'C:\Temp\Tomcat',
}
@petems
Copy link
Author

petems commented Mar 10, 2016

@petems
Copy link
Author

petems commented Mar 10, 2016

Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)

[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)

}

Unzip "C:\a.zip" "C:\a"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment