Commando’s om Azure Developer CLI zonder vragen te installeren, weer te verwijderen en te detecteren in uitroltools. Een commando staat er alleen als het vaststaat: uit het manifest of als gedocumenteerde standaard van de installertechniek.
Gerelateerde handleiding: Stille installatie-parameters: MSI, NSIS, Inno Setup · Programma verwijderen via register of PowerShell
Met winget
PowerShell
winget install --id Microsoft.Azd -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.Azd -e --silentwinget uninstall --id Microsoft.Azd -e --silentPer installer
64-bits · MSI · en-US
Stille installatie
msiexec /i azd-windows-amd64.msi /qn /norestartLogbestand schrijven
msiexec /i azd-windows-amd64.msi /qn /norestart /l*v "%TEMP%\azure-developer-cli-install.log"Verwijderen
msiexec /x {978324AD-946F-400A-B0B8-CA4FFA4E5C94} /qn /norestart- MSI-productcode
- {978324AD-946F-400A-B0B8-CA4FFA4E5C94}
- Registersleutel voor verwijderen
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{978324AD-946F-400A-B0B8-CA4FFA4E5C94}
PowerShell: downloaden, controleren, installeren
Downloadt het officiële bestand, controleert de SHA256-hash en installeert stil.
install-azure-developer-cli.ps1
$url = 'https://download.microsoft.com/download/db9e72d2-bf55-4f15-a424-5f7b86ac846d/721f0e7a-3248-44da-995d-5a06df2b5af7/azd-windows-amd64.msi'
$sha256 = '2DA3CE19FE1BE3C474A3D368F94EF5E858A5473272FDE06295CBC38190B85765'
$file = Join-Path $env:TEMP 'azd-windows-amd64.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