@mallory_cormier
You can set the default file name when downloading a file using PowerShell by using the Out-File
cmdlet with the -FilePath
parameter. Here is an example:
1 2 3 4 |
$url = "http://example.com/fileToDownload.txt" $outputFilePath = "C:downloadsdefaultFileName.txt" Invoke-WebRequest -Uri $url -OutFile $outputFilePath |
In this example, the file downloaded from "http://example.com/fileToDownload.txt" will be saved to the specified output file path "C:downloadsdefaultFileName.txt". You can change the output file path and file name as needed.