Commands for installing Oracle Cloud Infrastructure 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 Oracle.OCI-CLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Oracle.OCI-CLI -e --silentwinget uninstall --id Oracle.OCI-CLI -e --silentBy installer
64-bit · MSI
Silent install
msiexec /i oci-cli-3.95.0-Windows-Server-Installer.msi /qn /norestartWrite a log
msiexec /i oci-cli-3.95.0-Windows-Server-Installer.msi /qn /norestart /l*v "%TEMP%\oracle-cloud-infrastructure-cli-install.log"Uninstall
msiexec /x {7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB} /qn /norestart- MSI product code
- {7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB}
- UpgradeCode
- {48B079F4-B598-438D-A62A-8A233A3F8901}
- Install folder
- Lib
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-oracle-cloud-infrastructure-cli.ps1
$url = 'https://github.com/oracle/oci-cli/releases/download/v3.95.0/oci-cli-3.95.0-Windows-Server-Installer.msi'
$sha256 = '1A1BC73DAB9F84480D6404DDD266496B357C944D2AED7CCB1FEF9AC3F698CC91'
$file = Join-Path $env:TEMP 'oci-cli-3.95.0-Windows-Server-Installer.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