I have the following snippet of Powershell script:
$source = 'd:\t1\*'
$dest = 'd:\t2'
$exclude = @('*.pdb','*.config')
Copy-Item $source $dest -Recurse -Force -Exclude $exclude
Which works to copy all files and folders from t1 to t2 but it only excludes the exclude list in the "root"/"first-level" folder and not in sub-folders.
Anybody know how to make it exclude the the exclude list in all folders?