Microsoft SQL Server Management Studio 22 Previewを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.SQLServerManagementStudio.22.Preview -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.SQLServerManagementStudio.22.Preview -e --silentwinget uninstall --id Microsoft.SQLServerManagementStudio.22.Preview -e --silentインストーラー別
64ビット · EXE · すべてのユーザー · en-US
サイレントインストール
vs_SSMS.exe --quietPowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-sql-server-management-studio-22-preview.ps1
$url = 'https://download.visualstudio.microsoft.com/download/pr/82de2b0e-c5c9-4a16-8adf-658429a1446d/e7301926d7dad80e1875f450882a3c2f44fad389c7f1549dabf89a34e47fd5d5/vs_SSMS.exe'
$sha256 = 'E7301926D7DAD80E1875F450882A3C2F44FAD389C7F1549DABF89A34E47FD5D5'
$file = Join-Path $env:TEMP 'vs_SSMS.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 '--quiet' -Wait