Last active
March 9, 2021 19:42
-
-
Save pronichkin/62217505978adf247270525bc7a21f18 to your computer and use it in GitHub Desktop.
Sample for installing .NET Framework on Windows when the component is “Disabled with payload removed” (which is the default OS configuration)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ImagePath = '<insert path to your image.iso>' | |
$DiskImage = Get-DiskImage -ImagePath $ImagePath | |
$Access = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.Access]::ReadOnly | |
$DiskImage = Mount-DiskImage -InputObject $DiskImage -Access $Access -PassThru | |
$Volume = Get-Volume -DiskImage $DiskImage | |
$Path = $Volume.DriveLetter + ':' | |
$Source = Join-Path -Path $Path -ChildPath 'Sources\SxS' | |
Add-WindowsCapability -Online -Name 'NetFX3~~~~' -Source $Source | |
$DiskImage = Dismount-DiskImage -InputObject $DiskImage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment