PSADT Series: Packaging .NET Framework 3.5 application for configmgr

By | April 1, 2023
Share

Considering this was at least my tenth time packaging this dotnet installer for ConfigMgr, I figured I should share it here for safe keeping. Further help on PowerShell App Deployment Toolkit (https://psappdeploytoolkit.com/). I will not be covering how to use PSADT, just the guts.

Detection Method:

$netfx3 = Get-WindowsOptionalFeature -Online -FeatureName NetFx3
if ($netfx3.state -eq 'Enabled') { write-output 'netfx3 is enabled' }

PSADT install/uninstall command lines:

## <Perform Installation tasks here>
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 -All -LimitAccess -Source $dirFiles

# <Perform Uninstallation tasks here>
Disable-WindowsOptionalFeature -Online -FeatureName NetFx3

Source files need to be pulled from latest ISO (sources\sxs\) from MS:

  • Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab
  • microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab
dotnet cab files from source iso
program command lines for install/uninstall

/Brian

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.