Referring to following error image, I would like to know on what error is that, do I need to use the latest powershell?
Furthermore, I would like to confirm on running powershell command
1) .\TestData.psl (last char is lower cap "L")
2) .\TestData.ps1 (last char is "1" or One)

Do you have any suggestions?
Thanks, to everyone very much for any suggestions (^v^)
$url = "https://www.hkex.com.hk/eng/stat/dmstat/dayrpt/dqe210401.zip"
$file = "D:\Sample.zip"
try{
if ((Test-Path $file) -and (Get-Item $file).length -gt 5kb) {
write-host "$file already exists."
}
else
{
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
Invoke-WebRequest $url -OutFile $file -ErrorAction Stop
Write-Host "$file has been downloaded."
}
}
catch [System.Exception] {
$httpStatus = $null
$tryError = $_.Exception
$urlIsValid = $false;
Write-Host "There was an error downloading $file"
}