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.
Offline RSAT tools for Windows 10 21H2
lalajee
1,816
Reputation points
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