🆕
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
1
$KeepTheseDirs = @('boot','efi','en-us','sources','fonts','resources')
2
Get-ChildItem $env:ProgramData\OSDCloud\Media | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
3
Get-ChildItem $env:ProgramData\OSDCloud\Media\Boot | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
4
Get-ChildItem $env:ProgramData\OSDCloud\Media\EFI\Microsoft\Boot | Where {$_.PSIsContainer} | Where {$_.Name -notin $KeepTheseDirs} | Remove-Item -Recurse -Force
Copied!

Sponsor

Home
Recast Software
OSDeploy is sponsored by Recast Software
Export as PDF
Copy link
Contents
Sponsor