The below script doesn't error out and it doesn't work. I have trapped it inside of a try catch block and that isn't working either. I am attempting to move only pdb, and dll files to a certain folder. However, when I run this script, the dll's and pdb's aren't moved. I probably have an order of operations mixup or something, but I thought this script should have worked...
gci -path $FromPath -Include ("*.dll", "*.pdp") | ? {$_.Name -match "PackageServiceLib|Package.capture.CSE.inc|PackageDBCore|Package.capture|PackageCommon|PackageServiceFramework"} | Copy-item -path $FromPath -destination $ToPath -force