Polecenia do instalacji programu Microsoft SQL Server 2017 Express bez pytań, do jego usuwania i do wykrywania w narzędziach wdrożeniowych. Polecenie jest podane tylko wtedy, gdy jest pewne: pochodzi z manifestu albo z udokumentowanych ustawień domyślnych technologii instalatora.
Powiązany poradnik: Parametry cichej instalacji: MSI, NSIS, Inno Setup · Odinstalowanie programu przez rejestr lub PowerShell
Przez winget
PowerShell
winget install --id Microsoft.SQLServer.2017.Express -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.SQLServer.2017.Express -e --silentwinget uninstall --id Microsoft.SQLServer.2017.Express -e --silentWedług instalatora
64-bit · EXE · en-US
Cicha instalacja
SQLServer2017-SSEI-Expr.exe /IACCEPTSQLSERVERLICENSETERMS /ENU /ACTION=Install /quiet /InstallPath="c:\Program Files\Microsoft SQL Server"PowerShell: pobierz, zweryfikuj, zainstaluj
Pobiera oficjalny plik, sprawdza jego SHA256 i instaluje go po cichu.
install-microsoft-sql-server-2017-express.ps1
$url = 'https://download.microsoft.com/download/5/E/9/5E9B18CC-8FD5-467E-B5BF-BADE39C51F73/SQLServer2017-SSEI-Expr.exe'
$sha256 = 'D8A5CD8F4380BE195AF82D0DDC21316713AB2B41FF6C48D86F87C5778DE18411'
$file = Join-Path $env:TEMP 'SQLServer2017-SSEI-Expr.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 '/IACCEPTSQLSERVERLICENSETERMS /ENU /ACTION=Install /quiet /InstallPath="c:\Program Files\Microsoft SQL Server"' -Wait