Yes, you can install .NET Framework 3.5 using PowerShell directly—no GUI installer required. The commandline approach skips version conflicts and works silently in most cases. The key is running the embedded setup package from the framework's source on your system. To do it, you’ll need Windows 7 or later with Windows SDK tools (for C++/CLI compatibility), but since .NET 3.5 is pre-packaged, the only actual dependency is PowerShell 5.1+.
What You'll Need
- Windows 7, 8, or 10 (32-bit or 64-bit) – 3.5 runs only on Windows Vista and later.
- PowerShell 5.1 or later – Older versions lack the necessary execution policy commands.
- Administrator privileges – The installer requires elevated rights.
- No pre-existing conflicts – If .NET 3.5 is already installed in a different location (e.g., C:\Program Files), uninstall it first to avoid path conflicts.
Step-by-Step
- Open PowerShell as Administrator:
- Press Win+X and select "Windows Terminal (Admin)" or "PowerShell (Admin)" from the menu.
- If prompted by UAC, click "Yes" to proceed.
- Verify PowerShell version:
Run this command to confirm you have at least PowerShell 5.1:
powershell -versionIf your version is below 5.1, upgrade PowerShell first usingAdd-WindowsCapability -Online -Name OpenSSL32~~~~0.0.1.0. - Download the .NET 3.5 setup from Microsoft's official URL:
Paste this URL into PowerShell and hit Enter>:
Invoke-WebRequest -Uri "https://download.microsoft.com/download/7/9/6/796ecf22-8d63-40b9-ae75-8b8b85339485/dotnetfx35.exe" -OutFile "dotnetfx35.exe"Wait for the download to complete. If you get a blocked download error, run the PowerShell command with the-UseBasicParsingflag or download manually from Microsoft's download page. - Run the installer silently:
Execute the downloaded installer with PowerShell's silent switch:
Start-Process -FilePath "." -ArgumentList "dotnetfx35.exe /quiet /norestart" -WaitThis skips the UI, installs to the default locationC:\Windows\Microsoft.NET\Framework\v3.5\, and avoids UI prompts. The/norestartflag prevents Windows from auto-restarting after completion. - Verify installation:
Run this to confirm .NET 3.5 is installed:
[Environment]::VersionInfo.VersionStringIf it shows3.5under the .NET framework line, the install succeeded. Alternatively, check the registry at:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFrameworkfor entries likev3.5. - Test with a CLI tool:
Create a C# console app to verify it works:
- Open a new PowerShell session and run:
New-Item -ItemType File -Path "test35.cs" -Force - Paste this code:
using System; class Program { static void Main() { Console.WriteLine("Hello from .NET 3.5!"); } } - Compile and run:
csc test35.csfollowed byTest35.exe
- Open a new PowerShell session and run:
Common Mistakes
- Missing PowerShell 5.1+: If you get errors like "The term 'Invoke-WebRequest' is not recognized," upgrade PowerShell first or use the offline installer on a working PC. Some networks block WebRequest.
- Admin rights required: If the installer fails, try running PowerShell as Administrator (right-click > "Run as administrator") or using
runas /user:admin_name "powershell command". - Download corruption: If the installer fails silently, download it manually from Microsoft's site and retry. Use
Test-Path dotnetfx35.exeto check if the file exists before running. - Conflicting .NET versions: If .NET 3.5 is already installed in a non-standard location (e.g.,
C:\Program Files (x86)\Microsoft.NET\), uninstall it first with:DISM /Online /Unregister-Component /ComponentID:{GUID-for-3.5}(Find the GUID in the registry underHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\3.5).
Tips
- Use the offline installer: For corporate networks, download the installer first, then use:
Start-Process -FilePath "dotnetfx35.exe" -ArgumentList "/quiet /norestart"in PowerShell. - Reboot afterward: Some systems require a restart after installation to complete the setup fully.
- Check dependencies: If you encounter errors like "Missing Windows SDK," install the Windows SDK 7.1 or later via the Windows SDK installer (comes with Visual Studio).
- Silent uninstall if needed: Remove .NET 3.5 later with:
DISM /Online /Cleanup-Image /RestoreHealthfollowed by a registry cleanup inHKLM\SOFTWARE\Microsoft\.NETFramework.
Troubleshooting
If the command fails, try these steps in order:
- Restart the PC: Network issues or pending updates can block downloads. A reboot often fixes silent failures.
- Check firewall/antivirus: Temporarily disable third-party security software to test for blocking. Add
dotnetfx35.exeto your firewall’s allowed list. - Run in offline mode: If you’re offline, transfer the installer to a working PC, install it there, then copy
dotnetfx35.exeto your machine and run it. - Manually add the registry key: If the installer fails, manually create the registry entry for .NET 3.5:
- Run
reg add "HKLM\SOFTWARE\Microsoft\.NETFramework" /v Version /t REG_SZ /d "3.5" /f - Manually copy the framework files from an existing PC’s
C:\Windows\Microsoft.NET\Framework\v3.5.
- Run
DISM /Online /Cleanup-Image /RestoreHealth
Reboot after running this.Frequently Asked Questions
Why does .NET 3.5 install silently?
The /quiet flag suppresses all UI prompts and installs the framework in the system’s default location without user interaction. This avoids conflicts with other .NET versions or third-party tools.
Can I install .NET 3.5 on Windows Server 2008?
Yes, .NET 3.5 is included by default on Windows Server 2008 R2 and later. If it’s missing, run:
wget https://download.microsoft.com/download/7/9/6/796ecf22-8d63-40b9-ae75-8b85339485/dotnetfx35.exe
then install as described, but note that some features may require additional components.
What if my PC has .NET 4.x but not 3.5?
.NET 3.5 and 4.x are not compatible in reverse. Use the silent installer above, but uninstall any existing .NET 3.5 first to avoid path conflicts. Check for conflicts with:
Get-WindowsCapability -Online | Where-Object Name -like "*dotnetfx*"
and remove any installed versions.
Does this method work on Windows 10/11?
Yes, but with caveats. On Windows 10/11, some users report missing dependencies (like the Windows SDK). Prefer the manual download from Microsoft’s site, or use the official Windows 8.1/Server 2012 R2 installer, which includes .NET 3.5 as part of the OS.
What’s the difference between installing .NET 3.5 via cmd and PowerShell?
Both methods achieve the same result, but PowerShell offers better control with silent flags and error handling. Command Prompt’s msiexec requires manual paths, while PowerShell’s Start-Process handles arguments natively.
How do I uninstall .NET 3.5?
Use DISM to remove the framework:
DISM /Online /Remove-Feature /All /NoRestart
Then manually delete the registry keys under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
and any folders in C:\Windows\Microsoft.NET\Framework.