How to download files from Windows Server Core

Purpose:

The purpose of this article is to demonstrate how to download files using powershell on Windows Server Core 2019, Windows Server Core 2016, or Windows Server Core 2012

The Windows Server Core is a very lightweight OS build available for free in AWS using a Tier2 Micro.  The Windows Server Core OS has a very limited graphical shell with a built in command prompt. It’s primary intended to be administered remotely. The benefit of using such an OS is that we will need less resources to run applications on the server side.  In addition, today, when most of the servers are virtualized, we can have higher density of the VMs per a virtualization host.   The good news is that you can run some graphical installations inside this limited environment. Therefore, we can install these applications in the same way you would install them on the full Windows Server.

Solution:

Step 1) RDP to the server and connect to the command line.

Step 2) Type Powershell to launch Powershell

Windowscore000111
Windowscore000112
Set the $URL variable with the file to download
$URL="https://pathandy.com/Downloads/PSTools.zip"
Set the $Path variable to a local location you have access to
$Path=”C:\users\administrator\PSTools.zip”
Run Invoke-WebRequest to get the URL file and save it to the path
Invoke-WebRequest -URI $URL -OutFile $Path

After hitting enter a small message will apear to let you know that the file is being downloaded.

Writing web request.

Wrting request stream...

Windowscore000113

Typing Dir will show the file has been downloaded.  Some executable's like Filezilla server will run with a graphical interface.

Notepad.exe is also an easy way to get to a GUI like interface in Windows Server Core.

Hope you found this helpfull.

Windowscore000114