AzCopy Updater Tool

Quick script to update AzCopy to the latest version.

This sample will download the latest version of AzCopy and place it in the C:\Azcopy folder. If you need to go back to a specific version, the previous versions will also be archived.

$root = "C:\azcopy"
$path = "$root\temp"
If(!(test-path -PathType container $path))
{
      New-Item -ItemType Directory -Path $path
}
$getfilename = (Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue -UseBasicParsing).headers.location
$outputFile = Split-Path $getfilename -leaf
(Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -OutFile "$($path)\$($outputFile)" -ErrorAction SilentlyContinue)
Expand-archive -Path "$($path)\$($outputFile)" -DestinationPath "$($root)" -Force
$outputdir = [io.path]::GetFileNameWithoutExtension("$($path)\$($outputFile)")
Copy-Item "$($root)\$($outputdir)\azcopy.exe" -destination "c:\azcopy\"

About the author

Jeff Pigott is a Senior Cloud Solution Architect at Microsoft, specializing in Azure Infrastructure technologies including Azure Arc, Azure Update Manager, SQL DB, security, and storage. With over 29 years of experience in IT, development, and DevOps, Jeff has worked with a wide range of platforms, tools, and languages. Jeff is passionate about staying up-to-date with the latest Microsoft technologies and services, and holds multiple Azure certifications.