Jump to content
Welcome to our new Citrix community!
  • 1

Script to copy favorites and other shortcuts to a new profile server


Zack Foster

Question

We have an existing profile server (profiler server is defined here as a file server that houses the user profiles).  We are in the process of migrating to a new profile server.  We do not want to copy all the data from the existing profile to the new profile server as there is a lot of extraneous data on the existing profile server.  Namely, a lot of cache, Teams, Internet, etc., that for one reason or another was not excluded from sync during initial setup.  Moreover, we have a lot of profiles from users no longer with our company.  So we only want to migrate basic things for active users, like a user's favorites, a user's desktop shortcuts, a user's Quick Launch shortcuts and a user's Quick Access links.  I am looking for a way to script copying favorites, etc., from one profile server to the other.  Any ideas how we can accomplish this?  I've tried copying files from one profile server to another at login.  While this copies the data to the new profile server, the copied data is not immediately available to the user; to access the copied data, a user needs to logoff/log back in.  I've also tried using robocopy to copy over basic file structure and the files we want to copy, but Citrix does not use this data.  So I am hoping someone can provide suggestions on how we can migrate some, basic, profile data over to the new profile server.  Thanks.

Link to comment

12 answers to this question

Recommended Posts

  • 0

Thanks.  I've tried robocopy.  Since we do not want to copy all the data over from the existing, I used robocopy to copy just the file structure for one test user.  Then, I used robocopy to copy over the test user's Edge bookmark file.  When this test user logged into Citrix, Citrix did not use the data in the "robocopied" profile. data; the Edge bookmark file was not used  Is there something we need to do to get Citrix to use this "robocopied" profile data?

Link to comment
  • 0

Here is how I'm using robocopy:

 

I just want to copy the file structure, not the files:

 

robocopy "\\existingfileshare\CTXProfiles\testuser\Win2016v6" "E:\CtxProfiles\testuser\Win2019v6" /e /sec /xf *


I am running this command on the new server.  The "E" drive is the local drive on the new server.

Robocopy successfully copies the folder structure with permissions, etc.

 

I then use robocopy to copy the Edge bookmark file:

 

robocopy "\\existingfileshare1\CTXProfiles\testuser\Win2016v6\UPM_Profile\AppData\Local\Microsoft\Edge\User Data\Default" "E:\CTXProfiles\testuser\Win2019v6\UPM_Profile\AppData\Local\Microsoft\Edge\User Data\Default" bookmarks /sec

 

The bookmark file copies over just fine.  But when "testuser" logs into Citrix, Edge does not use the bookmark file.  Permissions are good.  But Edge does not use this file.

 

Thoughts?

Link to comment
  • 0

If I copy over the NTUser.dat file, then the bookmarks do show up when I launch Edge.

 

However, I receive a "Citrix WinFrame" error on login.

 

So while copying the "NTUSER.DAT" does get Citrix to actually use the bookmark file, it creates another problem.

 

Thoughts?

 

Citrix WinFrame error.PNG

Link to comment
  • 0

I would expand the scope of what you copy over. We found it easier to robocopy the entire profile except for known contributors of profile bloat. Something like:

\\existingfileshare1\CTXProfiles\testuser\Win2016v6\UPM_Profile E:\CTXProfiles\testuser\Win2019v6\UPM_Profile  /S /COPYALL /XD Pending WebEx Emojis sip_* /XF *.lok *.tmp *.temp *.bak *.etl emoji*.* 

Edited by Ruben Centeno
Change /SEC to /COPYALL.
Link to comment
  • 0

We would need to exclude the Edge cache folder:

 

CTXProfiles\testuser\Win2016v6\UPM_Profile\AppData\Local\Microsoft\Edge\User Data\Default\Cache

 

We're also moving from Outlook 2016 to Outlook Office 365.  So I am fairly sure I should exclude Outlook files as well.

 

Link to comment
  • 0

I tried the robocopy command you suggested.  After copying the whole profile over to the new server, I found that the test user could not use the copied profile.  Received a message, "There was a problem setting up your profile."  You have been logged on with a temporary profile, but changes you make during the session will not be saved.""

 

In regards to tuning the UPM capture, yes, I have setup policies to prevent cache, etc. from being synced. 

 

With that said, I really would just like to copy over specific files and not have to try dealing with the mess that is our existing profiles.

 

Is there no way just to copy over specific files and have Citrix use these files in a new profile?

 

Link to comment
  • 0

Try adding /SECFIX.

 

Ultimately, yes, there is a way just to copy over specific files and have Citrix use these files in a new profile. At a minimum this needs to include NTUSER.DAT and any required Windows folders that aren't being redirected, e.g. Desktop, Documents, etc.

 

If the scope of what you want to migrate is very limited, you could also try creating a login script to copy just those files from the W2016 profile on the share to %userprofile% when they login to W2019.

Link to comment
  • 0

I did create a login script to copy the files we want from the current Profile server to the new Profile server.

 

This worked.

 

However, users will only "see" the copied files on subsequent logins.  That is, since Citrix sets up a profile on the server a user is logging into, then Citrix doesn't "see" the copied file on first login.

 

So while I could use the script to copy files from one profile server to another profile server at login, users may get confused why their files are not present until subsequent logins.

 

Thoughts?

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...