Project

General

Profile

Feature #781

Using Wget on Windows Server 2012 Core

Added by Daniel Curtis about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
PowerShell
Target version:
Start date:
03/20/2016
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

I recently needed to download an archive from the Internet onto a Windows Server 2012 Core machine. This is a simple guide on using wget on Windows Server 2012 Core via PowerShell. Additionally, I will cover compressing and extracting .zip archives using PowerShell

  • From the command prompt, open a powershell session:
    powershell
    
  • Use wget to download a .zip archive from the Internet:
    wget http://www.example.com/someArchive.zip -UseBasicParsing -OutFile someArchive.zip
    

Compress/Extract Archives

NOTE: .NET 4.5 is required for this method to work properly.

  • Add the compression type:
    Add-Type -A System.IO.Compression.FileSystem
    
  • To compress a directory into a .zip archive:
    [IO.Compression.ZipFile]::CreateFromDirectory('someArchive', 'someArchive.zip')
    
  • To extract a .zip archive to a directory:
    [IO.Compression.ZipFile]::ExtractToDirectory('someArchive.zip', 'someArchive')
    

Resources

#1

Updated by Daniel Curtis about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#2

Updated by Daniel Curtis almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF