Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Download Files Using Command in Windows Server Core 2016

I have a Windows Server 2016 in Core mode, i.e. most of the GUI programs are not available.

Steps:

1. Set the SecurityProtocol. It is required for https:

[Net.ServicePointManager]::SecurityProtocol = 
  [Net.SecurityProtocolType]::Tls12 -bor `
  [Net.SecurityProtocolType]::Tls11 -bor `
  [Net.SecurityProtocolType]::Tls

2. The actual command, iwr, is an alias of Invoke-WebRequest :

iwr -outf filename https://example.com

References:

  1. https://superuser.com/a/755581/328810
  2. https://stackoverflow.com/a/48030563/350580

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: