Invoke-WebRequest - unable to connect to the remote server

Hi,
I do some stuff on TryHackMe and have this problem:
I use my Linux VM connected to the TryHackMe openvpn and deployed windows server machine where I have to download nc.exe file - but I cannot.

I have created a simple http server with python on my linux machine and I’ve wanted to download the file from there but I can see just the error - in the photo.

Any ideas please?

Welcome to PowerShell.org forums !

Check your proxy setting to see if its causing any trouble, there were couple of similar solved threads in this forums,

Search results here: Search results for ‘unable to connect to the remote’ - PowerShell Forums

I got the message - (5) Access is denied.

I do not have access to the Administrator account.

do you have a 2012 or later OS to test, like mentioned in the one of the search results.

Windows Server 2019 Datacenter.

What is the PowerShell version ? So are you using the 2019 OS now ? if not can you try using it ?

I would try moving your file OUT of the root of your web and see if that helps. Most web servers implicitly deny access to root.