boostger.blogg.se

Create zip command line windows
Create zip command line windows













The top level folder in the archive will be Work. New-ZipArchive -path c:\work -outputpath e:\workback.zipĬreate a new zip file called WorkBack.zip. Alternatively, you can use the Shell.Application COM object, which I’ll show you how to use in this article. The suggestion is to use Windows Explorer to create the zip file. There are reports that zip files created with the .NET compression classes don’t work properly in a pull server situation. Although there’s a checksum step that needs to be performed, but that’s not what I’ll cover in this article today. If you want to deploy custom resources to managed nodes, then the resources need to be zipped up and copied to the pull server. This is especially true when you’re working with Desired State Configuration (DSC) and a pull server.

create zip command line windows create zip command line windows

However, all of these should be unnecessary by the time PowerShell 5.0 rolls around, but we’ll need to roll out our own zip tools for now. NET compression classes, where some scripts simply call command-line versions of third-party archiving commands like WinRar, 7Zip, or even the venerable WinZip. If you search the web, then you’ll find no shortage of PowerShell scripts for creating ZIP archives.















Create zip command line windows