Posts

Showing posts from November 9, 2025

PowerShell Script: Install-SQLServer

PowerShell Script: Install-SQLServer.ps1 # PowerShell Script: Install-SQLServer.ps1 # Purpose: Fully automate SQL Server and SSMS installation # --- Variables --- $SQLDownloadURL = "https://go.microsoft.com/fwlink/?linkid=866658" # SQL 2022 Developer $SSMSDownloadURL = "https://aka.ms/ssmsfullsetup" $SQLInstaller = "C:\SQLServer2022.exe" $SQLMediaPath = "C:\SQLSetup" $ConfigFile = "C:\SQLSetup\ConfigurationFile.ini" $SSMSInstaller = "C:\SSMSSetup.exe" # --- Step 1: Download installers --- Write-Host "Downloading SQL Server..." Invoke-WebRequest -Uri $SQLDownloadURL -OutFile $SQLInstaller Write-Host "Downloading SSMS..." Invoke-WebRequest -Uri $SSMSDownloadURL -OutFile $SSMSInstaller # --- Step 2: Extract SQL Server setup files --- Write-Host "Extracting SQL Server installer..." Start-Process -FilePath $SQLInstaller -ArgumentList "/ACTION=Download /MEDIAPATH=$SQLMediaPath /QUIET" -Wait ...

Full setup including prerequisites

1. Prerequisites Before installation, confirm the following: Hardware: CPU: 1.4 GHz or faster (2 GHz+ recommended) RAM: 2 GB minimum (4 GB+ recommended) Disk: 10 GB+ free space for setup 64-bit processor required (x64) Operating System: Windows Server 2016, 2019, 2022 Windows 10 or 11 (Pro or Enterprise) Software Requirements: .NET Framework 4.8 or higher Windows PowerShell 5.1 Microsoft Visual C++ Redistributable (auto-installed by setup) Administrative privileges Latest Windows updates applied Network (if using remote connections): Static IP or hostname TCP 1433 open in firewall SQL Browser service (UDP 1434) enabled if using named instances --- 2. Download From https://www.microsoft.com/sql-server. Choose: Developer Edition (full features, free for dev/test) Express Edition (free, limited resources) --- 3. Install 1. Run the installer → select Custom. 2. SQL Server Installation Center → New SQL Server stand-alone installation. 3. Accept license → proceed. 4. Feature Selection → choo...