Commands for installing Bicep 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.Bicep -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.Bicep -e --silentwinget uninstall --id Microsoft.Bicep -e --silentBy installer
64-bit · EXE (Inno Setup) · All users
Silent install
bicep-setup-win-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
bicep-setup-win-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\bicep-cli"- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7EF9DE63-59B1-4325-955A-937F3E0A4EA8}_is1
- Install folder
- %LocalAppData%\Programs\Bicep CLI
- DisplayVersion
- 0.48.1.52935
64-bit · Portable
No installation needed (portable)
ARM64 · Portable
No installation needed (portable)
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-bicep-cli.ps1
$url = 'https://github.com/Azure/bicep/releases/download/v0.48.1/bicep-setup-win-x64.exe'
$sha256 = '8CB241203F65DAAADFDC81C0AFF58FEF20DB6E68431CA01259FE066459301821'
$file = Join-Path $env:TEMP 'bicep-setup-win-x64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait