diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 622909b03..ba6197d26 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -289,6 +289,12 @@ "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -712,6 +718,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index dc303a192..3b5ba9d79 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -274,6 +274,12 @@ "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -697,6 +703,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/scripts/Installers/Install-AzCopy.ps1 b/images/win/scripts/Installers/Install-AzCopy.ps1 new file mode 100644 index 000000000..035edee25 --- /dev/null +++ b/images/win/scripts/Installers/Install-AzCopy.ps1 @@ -0,0 +1,6 @@ +################################################################################ +## File: Install-AzCopy.ps1 +## Desc: Install AzCopy10 +################################################################################ + +Choco-Install -PackageName azcopy10 \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-AzCopy.ps1 b/images/win/scripts/Installers/Validate-AzCopy.ps1 new file mode 100644 index 000000000..dd090297a --- /dev/null +++ b/images/win/scripts/Installers/Validate-AzCopy.ps1 @@ -0,0 +1,10 @@ +################################################################################ +## File: Validate-AzCopy.ps1 +## Desc: Validate AzCopy10 +################################################################################ +if (Get-Command -Name 'azcopy') { + Write-Host "$(azcopy --version) on path" +} else { + Write-Error "azcopy not on path" + exit 1 +} \ No newline at end of file diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 903d39476..07938d2f7 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -93,6 +93,7 @@ $markdown += New-MDList -Style Unordered -Lines @( $markdown += New-MDHeader "CLI Tools" -Level 3 $markdown += New-MDList -Style Unordered -Lines @( (Get-AzureCLIVersion), + (Get-AzCopyVersion), (Get-AzureDevopsExtVersion), (Get-AWSCLIVersion), (Get-AWSSAMVersion), diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 510269c25..0fcb5e3a1 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -141,6 +141,10 @@ function Get-AzureCLIVersion { return "Azure CLI $azureCLIVersion" } +function Get-AzCopyVersion { + return ($(azcopy --version) -replace "version ") +} + function Get-AzureDevopsExtVersion { $azureDevExtVersion = (az version | ConvertFrom-Json | Foreach{ $_."extensions" })."azure-devops" return "Azure DevOps CLI extension $azureDevExtVersion"