Is it possible to create a zip archive using PowerShell?
A pure PowerShell alternative that works with PowerShell 3 and .NET 4.5 (if you can use it):
function ZipFiles( $zipfilename, $sourcedir )
{
Add-Type -Assembly System.IO.Compression.FileSystem
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir,
$zipfilename, $compressionLevel, $false)
}
Just pass in the full path to the zip archive you would like to create and the full path to the directory containing the files you would like to zip.