If I’m understanding what you are stating, in order to simulate an error to make sure its working, you are renaming the folder so Move-Item fails. Instead it creates D:\Dest\Files. This is by design and is how the Move-Item cmdlet works. The Move-Item lets you also rename, so this is what it’s doing I think.
Move-Item (Microsoft.PowerShell.Management) - PowerShell | Microsoft Learn
See the very first example.
I think you need to play around with Move-Item some more and review the docs a bit on it.
For example, when I do `Get-ChildItem’ against a SINGLE item
Get-ChildItem -Path .\test.txt | Move-Item -Destination .\DoesNotExist
All this does is rename test.txt to DOesnotExist with no extension.
Furthemore, When I do get-childitem and have multiple file in scope, and then I feed it a folder that doesn’t exist:
Get-Childitem -Path .\ -Filter *.txt | Move-Item -Destination '.\Stuff 3\'
The first file in the pipeline gets renamed to Stuff 3 with no extension, and the rest of the files fail because they can’t create a file that already exists. if you add -force to i think it does continue without errors, it just repeats it ‘x’ times where x is the # of files you are trying to ‘move’ in the pipeline.
one approach may be to determine what errors you’ve ran into during testing (actual errors) and add logic to handle those. But when testing to try and replicate, you need to ensure you’re actually replicating the error you are trying to catch.