Commands for installing Azure Data CLI without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id Microsoft.Azure.DataCLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.Azure.DataCLI -e --silentwinget uninstall --id Microsoft.Azure.DataCLI -e --silentBy installer
64-bit · MSI
Silent install
msiexec /i azdata-cli-20.3.14.msi /qn /norestartWrite a log
msiexec /i azdata-cli-20.3.14.msi /qn /norestart /l*v "%TEMP%\azure-data-cli-install.log"Uninstall
msiexec /x {1C7097D3-B00B-4F1A-B9A6-A00C1CD49EA4} /qn /norestart- MSI product code
- {1C7097D3-B00B-4F1A-B9A6-A00C1CD49EA4}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1C7097D3-B00B-4F1A-B9A6-A00C1CD49EA4}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-azure-data-cli.ps1
$url = 'https://download.microsoft.com/download/f/f/f/fffaa914-d4f7-4885-89c7-696bbfe7670a/azdata-cli-20.3.14.msi'
$sha256 = '7F58F76FCB83232A8D806BAF1FDAE15B452D72D0360EC758FA04B5966E4E24DE'
$file = Join-Path $env:TEMP 'azdata-cli-20.3.14.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait