I am trying to create a one-liner to recursively copy and flatten a folder structure. This works in the PowerShell console but in the PowerGUI Editor debugger, no files are copied.
Well… there are some things that behave differently in a debugger; mainly certain automatic variables such as $PSCmdlet, $MyInvocation, and so on. You’re not using any of those, and I’m not sure why this wouldn’t be working. Have you tried running just the Get-ChildItem part to make sure the proper results are coming out of there? Do you get any error messages?