metasploit-frameworkを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
インストーラー別
64ビット · MSI
サイレントインストール
msiexec /i metasploit-framework-6.5.3-20260826060514-1rapid7-1-x64.msi /qn /norestartログを出力
msiexec /i metasploit-framework-6.5.3-20260826060514-1rapid7-1-x64.msi /qn /norestart /l*v "%TEMP%\metasploit-framework-install.log"PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-metasploit-framework.ps1
$url = 'https://windows.metasploit.com/metasploit-framework-6.5.3-20260826060514-1rapid7-1-x64.msi'
$sha256 = '2556D431EF76FD85D39D0C914B604ADCF9D7050A61393B770C4319547501D8C7'
$file = Join-Path $env:TEMP 'metasploit-framework-6.5.3-20260826060514-1rapid7-1-x64.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