Offline RSAT tools for Windows 10 21H2

lalajee 1,816 Reputation points
2022-09-28T09:51:34.377+00:00

Hi,

I have created an script to install RSAT tools onto Windows 10 21H2 machine but its not installing if I copy all of the source files from FoD for individual languages

Copy Files script

$path = "C:\SW_DVD9_NTRL_WIN_10_2004_64BIT_MULTILANG_FOD_1_X22-21311\"  
  
$lang = "en-GB"  
$dest = New-Item -ItemType Directory -Path "$env:SystemDrive\temp\RSAT_21H2_$lang" -force  
  
#get RSAT files   
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  

Install script

$RSAT_FoD = Get-WindowsCapability –Online | Where-Object Name -like 'RSAT*'  
$FoD_Source = "C:\Temp\RSAT_21H2_en-GB\"  
  
Foreach ($RSAT_FoD_Item in $RSAT_FoD)  
{  
    Add-WindowsCapability -Online -Name $RSAT_FoD_Item.name -Source $FoD_Source -LimitAccess -ErrorAction Stop #-LogPath $logFile -Verbose  
}  

If I try this then it works

$RSAT_FoD = Get-WindowsCapability –Online | Where-Object Name -like 'RSAT*'  
$FoD_Source = "SW_DVD9_NTRL_WIN_10_2004_64BIT_MULTILANG_FOD_1_X22-21311"  
  
Foreach ($RSAT_FoD_Item in $RSAT_FoD)  
{  
    Add-WindowsCapability -Online -Name $RSAT_FoD_Item.name -Source $FoD_Source -LimitAccess -ErrorAction Stop #-LogPath $logFile -Verbose  
}  

it looks like some files are missing from each language folder but I dont know what files could be missing

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,980 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,960 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HugeZhong 106 Reputation points
    2022-09-29T03:56:06.243+00:00

    Actually you do miss some files. As we don't know what files needed, you must use "dism /export-source" command to export necessary files from MS official media for a single Capability。Please refer to FOD repositories here: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-capabilities-package-servicing-command-line-options?view=windows-11.


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.