The .NET Framework 4.0 brought an upgrade to the System.IO.Compression classes allowing native handling of zip files. The two scripts below demonstrate compression and expansion uses these classes.

The relevant assemblies must be loaded if they are to be used.

Once that’s done, the following functions may be used.

Compress-Item

Expand-Item

Leave a Reply

Your email address will not be published. Required fields are marked *