OK I have powershell creating a list of profiles accessed in the last 45 days and outputting it to a text file profiles.txt, that is working fine.
I than need to copy the profiles from that list to a nas for safe keeping during a migration project.
I tried using with it not working at all
$profiles= "profiles.txt"
c:\windows\system32\robocopy c:\users\$profiles \\nas\$env:computername\Users /mir /zb /r:0 /w:0