Installing only the DOTNET Software Development Kit for Windows SDK in silent mode.
Using this PowerShell script to perform a silent install is a great way to achieve this without having to go through all the prompts. This will only install the /features OptionId.NetFxSoftwareDevelopmentKit Save this as SDK.ps1 and run it on your server or workstation. This must be saved to the same folder as the SDK.
# This ensures it finds the exe in the same folder as the script
$InstallerPath = Join-Path$PSScriptRoot"WinSDKSetup.exe"if (Test-Path$InstallerPath) {
Start-Process-FilePath$InstallerPath-ArgumentList"/features OptionId.NetFxSoftwareDevelopmentKit /q /norestart"-WaitWrite-Host"Installation of .NET Tools has finished."-ForegroundColorGreen
} else {
Write-Warning"Could not find WinSDKSetup.exe in $PSScriptRoot"
}