安裝:
Setup.exe /QS /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /IACCEPTSQLSERVERLICENSETERMS=1 /UPDATEENABLED=False /SAPWD=P@ssw0rd /SECURITYMODE=SQL /TCPENABLED=1 /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
防火牆:
netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = DOMAIN
netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN
Enable-NetFirewallRule -DisplayGroup "遠端服務管理"
更新: SQLServer2017-KB4466404-x64.exe /qs /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances