Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Use PowerShell to Create Zip Archive

$
0
0

Summary: Learn how to use Windows PowerShell to easily create a zip archive.

Hey, Scripting Guy! Question How can I use Windows PowerShell to create a zip archive of a folder on my system?

Hey, Scripting Guy! Answer Use Get-ChildItem from PSCX to copy the files, and pipe the output to the Write-Zip cmdlet:

Get-Childitem c:\fso -Recurse | Write-Zip -IncludeEmptyDirectories -OutputPath C:\fso_bu\fso.zip

Note: I have written several blog posts about the Windows PowerShell Community Extension Project.
For more information about obtaining the PSCX module, see these Hey, Scripting Guy! Blog posts.


Viewing all articles
Browse latest Browse all 17778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>