Private/Download-CustomFile.ps1

# Will be called in VM
function Global:Download-CustomFile {
    [CmdletBinding()]
    <#
    .SYNOPSIS
        ...
    .DESCRIPTION
        ...
    #>

    param(        
        [Parameter(Mandatory = $false, Position = 1)]
        [string]
        $URI,
        [Parameter(Mandatory = $true, Position = 2)]
        [string]
        $DestinationFile
    )
    if (Test-Path $DestinationFile) {
        Remove-Item $DestinationFile -Force
    }
    Write-Verbose "Download file..."
    $wc = New-Object System.Net.WebClient
    $wc.DownloadFile($URI, $DestinationFile)
    Write-Verbose "File $(Split-Path $DestinationFile -Leaf) downloaded."
}