Start-BitsTransfer exposes proxy configuration on the transfer itself. With the Windows BitsTransfer module available, an explicit authenticated route can be supplied as follows:

$transfer = @{
    Source = 'https://downloads.example.net/file.zip'
    Destination = 'C:\Downloads\file.zip'
    ProxyUsage = 'Override'
    ProxyList = 'proxy.example.net:8080'
    ProxyAuthentication = 'Negotiate'
    ProxyCredential = (Get-Credential)
    ErrorAction = 'Stop'
}
Start-BitsTransfer @transfer

The addresses and local path are examples. Choose the authentication method supported by the proxy; Negotiate is the method selected in this fragment. Override tells the job to use the supplied proxy list rather than its default discovery policy.

The credential prompt supplies the proxy account for this job. A bypass decision obtained from a WebClient does not establish whether BITS will need authentication. BITS has its own job configuration and authentication exchange.

-ErrorAction Stop lets the caller handle a cmdlet error with PowerShell's try/catch flow. Keep the original error record when reporting a failed transfer. Matching only an English phrase such as “Proxy authentication is required” ties error handling to the rendered message instead of the job's actual error information.

Аффингæй хæстæг статьялтæ