Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell Extract Zip Files

Posted on September 11, 2015May 8, 2018 By David Kittell
function Expand-ZipFile([string]$File, [string]$Destination) #The targets to run.
{
    $Shell = new-object -com shell.application

    # Get the name of the Zip file
    $Zip = $Shell.NameSpace($File)

    #Expand/Extract each file from the zip file
    foreach($Item in $Zip.items())
        {
            $Shell.Namespace($Destination).copyhere($Item)
        }
}
Expand-ZipFile –File "C:\file.zip" –Destination "C:\tempfile"

Reference: http://www.howtogeek.com/tips/how-to-extract-zip-files-using-powershell/

Originally Posted on September 11, 2015
Last Updated on May 8, 2018
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

UNIX – Extract RedHat/CentOS/Fedora RPM File

Posted on April 21, 2016April 21, 2016

I love to find RPM files that someone has compiled so that I don’t have to do the manual work but when I find one at a questionable location or one I’m simply not familiar with it’s nice to know what is in it. Recently I did a search on…

Read More

XML Site Map

Posted on October 17, 2013October 26, 2015

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="generateXML.aspx.vb" Inherits="Examples_generateXML" %> <%@ Register Assembly="Ektron.Cms.Controls" Namespace="Ektron.Cms.Controls" TagPrefix="CMS" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Generate Sitemap Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button runat="server" ID="btnGenerate" Text="Click to Generate Sitemap" OnClientClick="displayWait()" /> <br /> <br /> <cms:login runat="server" id="login1"…

Read More

Acrylic Proxy DNS Setup

Posted on October 16, 2015October 16, 2015

While still configuring my changes to Raspberry Pi Setup Proxy Server this works on an individual computer. NOTE: I have this setup mainly for the Wi-Fi, if you want it for wired connections you will need to change Wi-Fi to “Ethernet” or “Ethernet 2” Step 1: Download and Setup Acrylic…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes