I'm writing a script that should be used for user migrations from one directory to another using powershell and robocopy. I have the paths I need to copy the users from and to and a CSV with the old usernames and new user names in seperated by "',". This is a pretty simple task but I am a powershell noob and am struggling to get it working.
I need to be able to customise the source and destination locations in the script for now I am using simply, c:\test\source and c:\test\dest. My attempt at making this work is attached. Please have a look and let me know where I'm going wrong. Only Newer files should be copied across each time so the script can be run multiple times during the migration and just pick up newer files the users may have added.