Skip to content

Instantly share code, notes, and snippets.

@vyusufcan
Last active March 26, 2025 10:26
Show Gist options
  • Save vyusufcan/2080bb018eeaadd0ebe52eecfd86537d to your computer and use it in GitHub Desktop.
Save vyusufcan/2080bb018eeaadd0ebe52eecfd86537d to your computer and use it in GitHub Desktop.
Windows Server Knowledges
# Install .NET 6.0 Runtime
Write-Host "Installing .NET 6.0..."
$dotnetInstallerUrl = "https://builds.dotnet.microsoft.com/dotnet/Sdk/6.0.428/dotnet-sdk-6.0.428-win-x64.exe"
$installerPath = "$env:TEMP\dotnet6-installer.exe"
Invoke-WebRequest -Uri $dotnetInstallerUrl -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList "/quiet /norestart" -Wait
# Enable IIS Feature
Write-Host "Installing IIS..."
Install-WindowsFeature -name Web-Server -IncludeManagementTools
# Restart IIS
Write-Host "Restarting IIS..."
Restart-Service W3SVC
Write-Host "IIS and .NET 6.0 installation completed."
Write-Host "Downloading SQL Server Express 2019..."
$Path = $env:TEMP
$Installer = "SQL2019-SSEI-Expr.exe"
$URL = "https://go.microsoft.com/fwlink/?linkid=866658"
Invoke-WebRequest $URL -OutFile $Path\$Installer
Write-Host "Installing SQL Server Express..."
Start-Process -FilePath $Path\$Installer -Args "/ACTION=INSTALL /IACCEPTSQLSERVERLICENSETERMS /QUIET" -Verb RunAs -Wait
$SSMSInstallerUrl = "https://aka.ms/ssmsfullsetup" # Latest SQL Server Management Studio
$SSMSInstallerPath = "C:\SSMSInstaller.exe"
Write-Host "SQL Server completed successfully!"
# Download SSMS
Write-Host "Downloading SQL Server Management Studio..."
Invoke-WebRequest -Uri $SSMSInstallerUrl -OutFile $SSMSInstallerPath
# Install SSMS
Write-Host "Installing SQL Server Management Studio..."
Start-Process -FilePath $SSMSInstallerPath -ArgumentList "/install /quiet /norestart" -Verb RunAs -Wait
Write-Host "SSMS installation completed successfully!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment