Hello experts, I would liek to copy files from the user profiles to another folder where the user has another folder.
for exampple for user lisa
copy c:\profiles\list\*.* d:\backup\lisa\
for one user is not problem, but i have a a list of users in a text file and I was wondering if there is a way to use that list to inser it in the username part. something like this
copy c:\profiles\%username%\*.* d:\backup\%username% Where the username is picked from a list and then it moves to the next.
Im sure there is a way. Just that im not an expert :)
example to move documents
$a = get-content c:\users.txt
foreach ($i in $a)
{move-item "Z:\profiles\$i\My documents" "z:\profles2\home\$i\"}