DBAtlas · Database operations atlas

SQL Server 2022 installation on Windows (unattended, production-ready)

SQL ServerLevel: IntermediateDuration: 45–75 min

Installs SQL Server 2022 silently (unattended) on a single Windows Server with a ConfigurationFile.ini generated from your choices (features, instance, service accounts/gMSA, collation, data/log/tempdb/backup directories, number of tempdb files, memory, MAXDOP, TCP). Before setup: disk format, power plan, Instant File Initialization and Lock Pages in Memory; after setup: T-SQL settings, firewall, verification and the first backup of the system databases. The result is a single verified, production-ready instance.

For a Linux server open the SQL Server installation on Linux guide. If you are building an Always On AG, install every node with this guide first (same collation and directories), then continue with the Always On AG (Windows) guide.

Topology: 1 Windows Server

Before you start

  • Windows Server 2016 or later (2019/2022/2025 recommended), current Windows Update, domain member (if a gMSA/domain account will be used). At least 6 GB free on the system disk; .NET Framework 4.7.2 or later.
  • SQL Server 2022 installation media under … (setup.exe is visible). …Licensed media downloaded from VLSC / the Microsoft 365 admin center.…… The latest CU file (SQLServer2022-KB…-x64.exe) under ….…
  • Separate disks attached: data …:, log …:, tempdb …:, backup …:. Formatted NTFS (or ReFS) with a 64 KB allocation unit. The system disk (C:) is not used for database files.
  • gMSA accounts (…, …) are created in AD and this server is allowed to retrieve the password (PrincipalsAllowedToRetrieveManagedPassword). The RSAT AD PowerShell module is installed on the server.
  • Domain service accounts (…, …) are created: password never expires, no interactive logon right, not a local administrator. The passwords are prompted for during setup.
  • SPNs for Kerberos: MSSQLSvc/….<domain>:… is registered on the service account (or the account is allowed to write its own SPN).
  • The account running setup is a local administrator and a member of the … group. PowerShell is opened as Administrator (Start → "PowerShell" → right-click → Run as administrator; the title shows Administrator:). Check administrator rights: whoami /groups | findstr S-1-5-32-544.
  • No pending restart (otherwise setup stops at the "Restart computer" rule).
  • A strong password for sa is chosen and stored in the password vault (prompted for during setup; sa is disabled after setup).
  • The TLS certificate is in the LocalMachine\My (Personal) certificate store: Server Authentication EKU, CN/SAN = the server FQDN, private key present.
  • A maintenance window is scheduled; a snapshot or backup of the server has been taken.

Phases of the guide

  • Windows preparation — Check system information and the .NET version · Set the power plan to High performance · Format disks with a 64 KB allocation unit · Verify the disk format · Create the directories · Install and test the gMSA on the server …
  • Unattended installation (ConfigurationFile.ini) — Write the ConfigurationFile.ini file · Run setup · Check the services and sqlcmd
  • Post-installation configuration — Configure server-level settings (sp_configure) · Configure the growth settings of the model database · Set a fixed TCP port · Configure the TLS certificate and force encryption · Restart the service · Add the firewall rule
  • Verification — Check the version, edition, collation and directories · Check IFI, Lock Pages and the service accounts · Test the remote connection · Install SSMS on a management workstation
  • After installation — Take the first backup of the system databases · Disable the sa account · Plan maintenance and monitoring
Open the step-by-step plan for your environment →