Comment on page
🆕
Media Cleanup
The default OSDCloud Template Media directory contains quite a bit of language resources

These don't really do much for me as the only language in my WinPE is en-us. This can be cleaned up a bit in PowerShell with these commands
$KeepTheseDirs = @('boot','efi','en-us','sources','fonts','resources')
Get-ChildItem $env:ProgramData\OSDCloud\Media | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
Get-ChildItem $env:ProgramData\OSDCloud\Media\Boot | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
Get-ChildItem $env:ProgramData\OSDCloud\Media\EFI\Microsoft\Boot | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force


Home
Recast Software
OSDeploy is sponsored by Recast Software
Last modified 1yr ago