Well, how many hoops are you willing go through? I'm not aware of any .gz unzipper for Windows other than Cygwin: http://www.cygwin.org/cygwin/ .
So you may have to have PowerShell cally Cygwin to unzip the files...
May want to check this out for ideas: http://wannemacher.us/?p=225
He's using the .NET GZipStream class: http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx
- Proposed as answer by Marco ShawModerator Friday, July 09, 2010 10:50 AM
- Marked as answer by Marco ShawModerator Monday, July 12, 2010 2:49 AM
You can also look at the PowerShell Community extensions
This Module contains Cmdlets like :
read-Arichive and Write-Gzip (write-Tar etc.)
Greetings MOW
- Proposed as answer by Marco ShawModerator Friday, July 09, 2010 10:50 AM
- Marked as answer by Marco ShawModerator Monday, July 12, 2010 2:49 AM
I wrote a function for this exact purpose and figured I'd share it here:
http://gallery.technet.microsoft.com/scriptcenter/ConvertFrom-GZip-edcbf6a9
It will read the contents of the GZip file and write it into the shell as one System.String object per line of text. I combine it with a filter to gather log data for my network team.