Create a zip-file using PowerShell
This function creates a zip file based on the location and filename behind the command
Usage : New-zip c:zipfilename.zip
New-zip | Get-zip | Extract-Zip | Move-Zip | Copy-Zip |
############################################################ # # NAME : NEW-ZIP # # AUTHOR : Wessel van Sandwijk # # Website : http://www.useful-it.nl # # COMMENT : Create ZipFile # # VERSION HISTORY : # 1.0 07-MRT-2013 - Initial Version # # USAGE : New-zip c:<zipfilename>.zip # ############################################################ New-Zip C:\scripts\Sample.zip ############################################################ # # FUNCTIONS # ############################################################ function New-Zip { param([string]$zipfilename) set-content $zipfilename ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18)) (dir $zipfilename).IsReadOnly = $false }
Latest posts by wvsandwijk (see all)
- [PS] How to validate VMWare ESX Certificates - September 7, 2018
- PoSH-Git : unable to start ssh-agent service, error :1058 - July 22, 2018
- [PS] Speedup VMWare PowerShell module - June 11, 2018