Get the contents of a zip file using powershell
############################################################
#
# NAME : Get-ZIP
#
# AUTHOR : Wessel van Sandwijk
#
# Website : http://www.useful-it.nl
#
# COMMENT : Get ZipFile
#
# VERSION HISTORY :
# 1.0 07-MRT-2013 - Initial Version
#
############################################################
Get-Zip c:\demo\myzip.zip
############################################################
#
# FUNCTIONS
#
############################################################
function Get-Zip
{
param([string]$zipfilename)
if(test-path($zipfilename))
{
$shellApplication = new-object -com shell.application
$zipPackage = $shellApplication.NameSpace($zipfilename)
$zipPackage.Items() | Select Path
}
}
About The Author
I am a DevOps Engineer from the Netherlands.
My Skills are mainly PowerShell, Ansible, Choco, Automation, Active Directory, VMWare, Hyper-V and Security.
Post navigation
More Stories
Running PowerShell Hyper-V and VMWare Modules
Extend the Evaluation Period on Windows Server
Now using Ansible, Chocolatey, Powershell