I developed a PowerShell script, and it\'s working absolutely fine. The only challenge is the files in the subfolders are not getting moved to the destination.
g
Don't waste your time trying to re-invent robocopy in PowerShell.
robocopy
robocopy \\servername\location C:\Dumps /e /mov /minage:31