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

PowerTip: Use PowerShell to Read the Content of a ZIP File

$
0
0

Summary: Learn how to use Windows PowerShell to read the content of a .zip file.

Hey, Scripting Guy! Question How can I read the content of a .zip file from within Windows PowerShell?

 Hey, Scripting Guy! Answer Use the OpenRead static method from the IO.Compression.ZipFile .NET Framework class.
            First, you will need to load the assembly that contains the class. Here is an example:

Add-Type -assembly "system.io.compression.filesystem"

[io.compression.zipfile]::OpenRead("E:\Ch10.zip").Entries.Name


Viewing all articles
Browse latest Browse all 34890

Trending Articles



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