Skip to content

Get-RemoteFile

SYNOPSIS

Download a file from url using specified proxy settings.

SYNTAX

Get-RemoteFile [[-url] <String>] [[-file] <String>] [[-ProxyLocation] <Uri>]
 [[-ProxyCredential] <PSCredential>] [-IgnoreProxy] [<CommonParameters>]

DESCRIPTION

Helper function to Download a file from a given url using specified proxy settings.

EXAMPLES

EXAMPLE 1

Get-RemoteFile -Url https://chocolatey.org/api/v2/0.10.8/ -file C:\chocolatey.zip

PARAMETERS

-url

URL of the file to download

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-file

File path and name to save the downloaded file to.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyLocation

Proxy uri to use for the download.

Type: System.Uri
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyCredential

Credential to use for authenticating to the proxy. By default it will try to load cached credentials.

Type: System.Management.Automation.PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreProxy

Bypass the proxy for this request.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Back to top