Windows 10 20H2 RSAT tools are failing to install from FOD

lalajee 1,821 Reputation points
2022-01-07T10:04:53.72+00:00

Hi,

I'm trying to install RSAT tools on Windows 10 20H2 but it keep failing

Step I use to install.
I download the FOD from Microsoft site "Windows 10 2004 FOD"
Then run this script to extract the files

$FoD_Source = "C:\Downloads\W10RSAT_FOD\2004\2004_FoD_Disk.iso"  

Mount-DiskImage -ImagePath "$FoD_Source"  

$path = (Get-DiskImage "$FoD_Source" | Get-Volume).DriveLetter  

$lang = "en-US"  



$dest = New-Item -ItemType Directory -Path "$env:SystemDrive\temp\RSAT_2004_$lang" -force  


Get-ChildItem ($path+":\") -name -recurse -include *\~amd64\~\~.cab,*\~wow64\~\~.cab,*\~amd64\~$lang\~.cab,*\~wow64\~$lang\~.cab -exclude *languagefeatures*,*Holographic*,*NetFx3*,*OpenSSH*,*Msix* |  
ForEach-Object {copy-item -Path ($path+“:\”+$_) -Destination $dest.FullName -Force -Container}  

#get metadata  

copy-item ($path+":\metadata") -Destination $dest.FullName -Recurse  

copy-item ($path +“:\"+“FoDMetadata_Client.cab”) -Destination $dest.FullName -Force -Container  

#Dismount ISO  

Dismount-DiskImage -ImagePath "$FOD_Source"  

Then use this script to install the RSAT tools

$FoD_Source = "$env:SystemDrive\temp\RSAT_2004_en_US"  

$RSAT_FoD = Get-WindowsCapability –Online | Where-Object Name -like 'RSAT*'  

#Install RSAT Tools  
Foreach ($RSAT_FoD_Item in $RSAT_FoD)  
{  
    Add-WindowsCapability -Online -Name $RSAT_FoD_Item.name -Source $FoD_Source -LimitAccess  
}  

Error code
Add-WindowsCapability : The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see https://go.microsoft.com/fwlink/?LinkId=243077.

At line:1 char:39
+ ... $RSAT_FoD){Add-WindowsCapability -Online -Name $RSAT_FoD_Item.name - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-WindowsCapability], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsCapabilityCommand

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. lalajee 1,821 Reputation points
    2022-01-10T10:25:50.913+00:00

    Got it working. The issue was the metadata folder, the script copy full metadata data which include xml file for other languages.

    After removing all other language xml file it worked without any issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.