Microsoft IIS Compressionを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.IIS.Compression -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.IIS.Compression -e --silentwinget uninstall --id Microsoft.IIS.Compression -e --silentインストーラー別
64ビット · MSI · en-US
サイレントインストール
msiexec /i iiscompression_amd64.msi /qn /norestartログを出力
msiexec /i iiscompression_amd64.msi /qn /norestart /l*v "%TEMP%\microsoft-iis-compression-install.log"アンインストール
msiexec /x {BBA81C6C-1E1C-4724-AB4A-CD80980C396F} /qn /norestart- MSIプロダクトコード
- {BBA81C6C-1E1C-4724-AB4A-CD80980C396F}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BBA81C6C-1E1C-4724-AB4A-CD80980C396F}
32ビット · MSI · en-US
サイレントインストール
msiexec /i iiscompression_x86.msi /qn /norestartログを出力
msiexec /i iiscompression_x86.msi /qn /norestart /l*v "%TEMP%\microsoft-iis-compression-install.log"アンインストール
msiexec /x {7B646093-730B-40CF-848D-3B5FFD68E1EE} /qn /norestart- MSIプロダクトコード
- {7B646093-730B-40CF-848D-3B5FFD68E1EE}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7B646093-730B-40CF-848D-3B5FFD68E1EE}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-iis-compression.ps1
$url = 'https://download.microsoft.com/download/6/1/C/61CC0718-ED0E-4351-BC54-46495EBF5CC3/iiscompression_amd64.msi'
$sha256 = '7FC023308C81397D733493DDFBE256B8352A97E8893E5749D812F59C8B7D004B'
$file = Join-Path $env:TEMP 'iiscompression_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 install-microsoft-iis-compression.ps1
$url = 'https://download.microsoft.com/download/6/1/C/61CC0718-ED0E-4351-BC54-46495EBF5CC3/iiscompression_x86.msi'
$sha256 = '27CC7CB2542D693FD9B064CB1211D87295BFF98E4A79DC3F737D01013F2870B5'
$file = Join-Path $env:TEMP 'iiscompression_x86.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