Invoke-DownloadMethod¶
SYNOPSIS¶
Downloads a file using the best method available depending on operating system.
SYNTAX¶
DESCRIPTION¶
Downloads a file using the best method available depending on operating system. On Windows systems this will attempt to use BITSTransfer if this is available and running, otherwise WebRequest is used.
EXAMPLES¶
EXAMPLE 1¶
This would download the file at 'https://example.com/myfile.zip' to 'C:\MyFile.zip'
PARAMETERS¶
-DownloadURI¶
The download URI
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-OutFile¶
The place to store the download
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.