Windows Server 2012 Command line install .net 3.5
— ny_wk

To install .NET Framework 3.5 on Windows Server 2012 from the command line, mount the OS installation media, point the source at the \sources\sxs folder, and run a single DISM command: Dism /online /enable-feature /featurename:NetFX3 /all /Source:D:\sources\sxs /LimitAccess. This guide explains why the feature fails by default, how to fix it cleanly, and how to verify the install on both Server 2012 and 2012 R2.
The Problem: Why .NET 3.5 Won't Install by Default
Many line-of-business applications, older SQL Server tools, and legacy services still require .NET Framework 3.5 (which also bundles the .NET 2.0 and 3.0 runtimes). On Windows Server 2012 and 2012 R2, .NET 3.5 is technically present as an optional feature, but it is a Features on Demand (FoD) payload that ships removed from the disk to save space.
When you try to enable it through Server Manager or DISM without preparing first, the install fails with a now-infamous error:
- Error: 0x800F0906 — the source files could not be downloaded.
- Error: 0x800F081F — the source files could not be found.
- Error: 0x800F0907 — DISM failed because of the configured source/Windows Update policy.
This happens because the system tries to pull the payload from Windows Update, and on a hardened, air-gapped, or WSUS-managed server that download is blocked or unavailable. The binaries simply are not on the system drive, so the feature has nothing to enable.
The Solution: Supply the Source from the Installation Media
The fix is to tell Windows exactly where the .NET 3.5 payload lives instead of letting it guess. That payload sits in the \sources\sxs folder of the matching Windows Server installation media (ISO or DVD). When you install .NET 3.5 on Windows Server 2012 with an explicit /Source, the dependency on Windows Update disappears entirely.
Two rules make this reliable:
- Match the build. The media must match the installed OS — use Server 2012 media for Server 2012, and Server 2012 R2 media for Server 2012 R2. They are not interchangeable for FoD.
- Match the patch level loosely. The base
sxspayload works in almost all cases; only in rare, heavily patched scenarios do you need an updated source.
Step-by-Step: Install .NET 3.5 with DISM
The most direct method uses the built-in Deployment Image Servicing and Management (DISM) tool. Run an elevated PowerShell or Command Prompt window (Run as Administrator).
- Attach the installation media. Mount the Windows Server 2012 / 2012 R2 ISO, or insert the DVD. Note the drive letter it receives (for example
D:). - Confirm the source folder exists. Verify the path before you run anything:
dir D:\sources\sxs
You should see files such asmicrosoft-windows-netfx3-ondemand-package.cab. - Run the DISM enable-feature command:
Dism /online /enable-feature /featurename:NetFX3 /all /Source:D:\sources\sxs /LimitAccess - Wait for completion. DISM reports progress as a percentage and finishes with
The operation completed successfully.No reboot is normally required.
Here is what each switch does, so you are never copy-pasting blind:
| Switch | Purpose |
/online | Targets the running operating system rather than an offline image. |
/enable-feature | Tells DISM to turn a Windows feature on. |
/featurename:NetFX3 | The internal feature name for .NET Framework 3.5 (case-sensitive). |
/all | Enables the parent feature and all of its dependencies in one pass. |
/Source:D:\sources\sxs | The local path to the payload, bypassing Windows Update. |
/LimitAccess | Stops DISM from contacting Windows Update at all — critical on air-gapped servers. |
Alternative: Install .NET 3.5 with PowerShell
If you prefer the Server Manager cmdlets, PowerShell offers a clean one-liner that does the same job. This is handy in scripts and for remote management. To install .NET 3.5 on Windows Server 2012 with the ServerManager module, run:
Install-WindowsFeature NET-Framework-Core -Source D:\sources\sxs
To enable it remotely against another server, add the -ComputerName parameter or wrap it in Invoke-Command:
Invoke-Command -ComputerName SRV01 -ScriptBlock { Install-WindowsFeature NET-Framework-Core -Source D:\sources\sxs }
A third option uses the modern DISM PowerShell module rather than the legacy executable:
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 -All -LimitAccess -Source D:\sources\sxs
All three approaches install the identical payload — choose whichever fits your tooling. DISM is the most portable because it exists on every edition, including Server Core.
Pointing the Source at a Network Share
On a fleet of servers you usually do not want to mount an ISO on each box. Copy the sxs folder once to a file share and reference it over UNC:
- Copy
\sources\sxsfrom the media to a share, for example\\fileserver\payloads\sxs2012r2. - Run DISM with the UNC path:
Dism /online /enable-feature /featurename:NetFX3 /all /Source:\\fileserver\payloads\sxs2012r2 /LimitAccess
If access is denied, confirm the server's machine account (not just your user account) can read the share, because the servicing stack runs under SYSTEM. Grant Read to Domain Computers or the specific computer object if needed.
Common Pitfalls and How to Fix Them
- Wrong media version. Using Server 2012 media against Server 2012 R2 (or a different language/edition) silently fails with 0x800F081F. Always match the exact OS build and language.
- Missing
/LimitAccess. Without it, DISM may still try Windows Update first, time out, and throw 0x800F0906 on isolated servers. Add it whenever you supply a local source. - WSUS/Group Policy override. The policy "Specify settings for optional component installation and component repair" can force downloads from Windows Update or a specific path. If it is blocking you, the local-source command with
/LimitAccessusually still wins; otherwise temporarily adjust the policy underComputer Configuration > Administrative Templates > System. - Pending reboot or corrupted component store. If DISM errors out unexpectedly, run
Dism /Online /Cleanup-Image /RestoreHealthand reboot, then retry. - Heavily patched server, base source rejected. Rarely, a fully updated server needs an updated
sxssource. In that case remove the conflicting update temporarily, install .NET 3.5, then reapply updates — or use an updated install media. - Typo in the feature name. It is
NetFX3for DISM andNET-Framework-CoreforInstall-WindowsFeature. Mixing them up produces a "feature not found" error.
Verification: Confirm .NET 3.5 Is Installed
Never assume success from a green message alone. Verify three ways:
- Query the feature state with DISM:
Dism /online /get-featureinfo /featurename:NetFX3
Look forState : Enabled. - Query with PowerShell:
Get-WindowsFeature NET-Framework-Core
TheInstall Statecolumn should readInstalled. - Check the registry release/version. For the 3.5 family, confirm the install key exists:
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5' -Name Install,Version
AnInstallvalue of1means the runtime is present.
After verification, launch or restart the application that required .NET 3.5 and confirm it loads its 2.0/3.0/3.5 assemblies without error.
A Note on Modern Equivalents
Windows Server 2012 and 2012 R2 both reached the end of extended support on October 10, 2023, so they no longer receive free security updates outside of paid Extended Security Updates (ESU). If you are standing up new infrastructure, use a supported platform such as Windows Server 2022 or Windows Server 2025, where the same Dism /online /enable-feature /featurename:NetFX3 /all /Source:<drive>\sources\sxs /LimitAccess syntax still works against that version's media. The procedure to install .NET 3.5 is essentially unchanged across these releases — only the media you point at differs. For genuinely modern apps, target .NET 8/.NET 9, which install side-by-side and do not rely on the legacy FoD mechanism at all.
Key Takeaways
- .NET 3.5 is a Features on Demand payload removed from disk by default, which is why it fails without a source.
- The payload lives in
\sources\sxson installation media that matches the exact OS build, edition, and language. - The reliable command is
Dism /online /enable-feature /featurename:NetFX3 /all /Source:<drive>\sources\sxs /LimitAccess. - Always include
/LimitAccesson hardened or air-gapped servers to skip Windows Update and avoid errors 0x800F0906 / 0x800F081F. - Verify with
Get-WindowsFeature NET-Framework-CoreorDism /online /get-featureinfo /featurename:NetFX3before declaring victory.
Frequently Asked Questions
Why does .NET 3.5 fail to install on Windows Server 2012?
The .NET 3.5 binaries are not stored on the system drive — they are a Features on Demand payload that Windows tries to fetch from Windows Update. On servers without internet access or with WSUS/Group Policy restrictions, that download is blocked, producing errors like 0x800F0906 or 0x800F081F. Supplying a local /Source path fixes it.
Where is the sources\sxs folder?
It is on the Windows Server installation media. Mount the matching ISO or insert the DVD, and the folder is at <drive>:\sources\sxs. You can also copy it to a network share and point DISM at the UNC path, as long as the server's machine account has read access.
Do I need to reboot after installing .NET 3.5?
Usually no — DISM enables the feature live and reports success without requiring a restart. If a reboot is genuinely pending from other servicing operations, DISM will tell you, in which case reboot and re-run the verification commands.
Can I install .NET 3.5 on Server Core?
Yes. Server Core has no Server Manager GUI, but DISM and the PowerShell cmdlets both work. Use the same Dism /online /enable-feature /featurename:NetFX3 /all /Source:<path> /LimitAccess command from the Server Core command line.
For more hands-on Windows Server and sysadmin walkthroughs, subscribe to @explorenystream on YouTube.