PowerShell For DevOps - Download File Using PowerShell

preview_player
Показать описание
In this video I have covered how to download files using Invoke WebRequest in PowerShell.

Script -
# Modify this script as per your requirement
# Source file location
$source = 'Enter your URL'

# Destination to save the file
$destination = 'C:\Users\user\Desktop\Downloads\file_name'

#Download the file
Invoke-WebRequest -Uri $source -OutFile $destination

Subscribe our channel for more tech stuff.

Music Used -
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Рекомендации по теме
Комментарии
Автор

For those doing this, make sure you actually name the file you will download after your destination path.
Thank you for sharing.

skanda
Автор

Also, for those who are downloading large files, the actual progress bar seems to be the reason behind the extremely slow download speed. To fix that, you are going to need to disable it. Simply put $ProgressPreference = 'SilentlyContinue' before the Invoke-WebRequest command.

skanda
Автор

Hey hi i give a challenge to you.
Write powershell script for update a webconfig file in particular place based on given value (webconfig file in particular VM and inside a vm has c:documents\web.config )

kumar-mibu
Автор

Can you share script to upload files to repo without using git commands

surajankale