-2

I'm currently working on migrating users to Windows 7 from XP. We use roaming profiles. Xp creates a folder named "Profile", while Windows creates "Profile.V2". Theses folders are independent of each other and do not synchronize. Users "lose" their desktop Favorites etc when using 7 for the first time. I'd like to script a solution which will copy (specific) data from "Profile" to "Profile.v2". Here's a basic outline of what I'd like to do:

# Check for location of users profile folder
#I realize I will need an "if" statement here:

\\server_1\%username%\profile   #eg... Boolean=False
\\server_2\%username%\profile   #eg... Boolean=True
\\server_3\%username%\profile   #eg... Boolean=False

# When true begin to iterate xcopy

xcopy /s/e/f \\server_2\users\%username%\profile\[My Documents] -> %HOMEPATH%\My Documents
xcopy /s/e/f\ \server_2\users\%username%\profile\[Desktop] -> %HOMEPATH%\Desktop
xcopy /s/e/f\ \server_2\users\%username%\profile\[Favorites] -> %HOMEPATH%\Favorites
xcopy /s/e/f\ \server_2\users\%username%\profile\[Favorites] -> %HOMEPATH%\Favorites
xcopy /s/e/f\ \server_2\users\%username%\profile\[app data]\Microsoft\Outlook\*.nk2 -> %APPDATA%\roaming\microsoft\outlook

Please keep in mind I do realize I could use other tools to accomplish this. I'm more or less interested in completing this task in this particular fashion, whether it be through batch or powershell. Thanks!

Qwilson
  • 150
  • 4
  • 1
    Have you transitioned to Windows 7 yet, or us this preparation? If you are using roaming profiles then you should also do redirected folders. Redirected folders will handle everything you are trying to migrate. – Zoredache May 31 '13 at 20:24
  • Also, what is your question? – Zoredache May 31 '13 at 20:25
  • @Zoredache I am manually having to copy to the directories I've outlined. I'd like to script this process. As it stands the script I have will not work. I guess my question is "How do I make this script work?". As stated at the end on my original post, I realize there are multiple ways to accomplish this. Folder redirection is not a requirement for roaming profiles. I just want to know how I can automate copying data using a script. – Qwilson May 31 '13 at 20:48
  • You're right. Redirection isn't a requirement, it's just *highly* recommended. If you have a chance to implement them now (and it is trivial with GPO to copy the folders you want), you should strongly consider it. – MDMarra Jun 01 '13 at 15:36
  • @MDMarra I can appreciate the point of view and I do see the value in performing user management in this fashion. However, "Roaming profile best practice" isn't my question. My question isn't out of line. If it is I'll gladly remove it. I was under the assumption that someone would be able to provide the information I require for my scenario (Which isn't beyond the realm of possibility that someone else might be facing a similar scenario). – Qwilson Jun 01 '13 at 19:42
  • 1
    "Gimme teh codez" type questions [don't really belong](http://meta.stackexchange.com/questions/108551/what-site-to-use-if-you-have-a-gimme-teh-codez-question). I was simply offering some experience (as a comment, not an answer) to hopefully help you in the long run. Do whatever you like with the information. – MDMarra Jun 01 '13 at 20:08
  • If this is the type of question you feel it to be, by all means, please flag it; suggest it should be closed. But after reading the faq, carefully reviewing my question, I feel this is a valid question for multiple scenarios. Thanks for your efforts. – Qwilson Jun 01 '13 at 20:38

1 Answers1

1

USTM (User State Migration Tool) lets you selectively extract a user profile and import it on a new or refreshed PC.

http://technet.microsoft.com/en-us/library/dd560801(v=ws.10).aspx

Trondh
  • 4,191
  • 23
  • 27
  • My question is very specific and this does not remotely begin to answer it. As previously stated "... I do realize I could use other tools to accomplish this. I'm more or less interested in completing this task in this particular fashion..." – Qwilson Jun 01 '13 at 19:36