VMware Horizon Community
shayrulah
Enthusiast
Enthusiast
Jump to solution

Copying Persistent Disk with Poweshell

Hi All,

Did anybody have tried Copy Persistent Disk - Samples - VMware {code}  script from VMware?

I have 100 users and script copies all user profiles in one place can anybody share how this script can be modified so to create folder for each user?

Reply
0 Kudos
1 Solution

Accepted Solutions
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

Make sure to update this line in the script to point to your file share and keep the \$un variable as it creates a subfolder for each user based on the username

#Update Below ***************************************

#Enter path of file share where user data can be copied

$pddestfs = "\\hzn-79-cs1-cdh.betavmweuc.com\PDData\$un"

#End Update ******************************************

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead

View solution in original post

11 Replies
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

I wrote the script - it does create a folder for each user.  It should be run with something like DEM to run under the context of each user - per user. It will detect a persistent disk, the copy all persistent disk data to a central location (folder for each user) and then copy back after they have been migrated off of the persistent disk.   I need to add more instructions on the page and will do that this week. 

The detailed details on usage are covered here: Modernizing VDI for a New Horizon | VMware

Thanks

Chris

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
Reply
0 Kudos
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

Make sure to update this line in the script to point to your file share and keep the \$un variable as it creates a subfolder for each user based on the username

#Update Below ***************************************

#Enter path of file share where user data can be copied

$pddestfs = "\\hzn-79-cs1-cdh.betavmweuc.com\PDData\$un"

#End Update ******************************************

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
shayrulah
Enthusiast
Enthusiast
Jump to solution

Hi Chris,

I have an issue with copy back files and reg keys to FSLogix pool. We are usint One drive for desktop and documents backup and when it tries to copy back the profiles from shared drive it gives an error message from below. Can you please advice?

Reply
0 Kudos
shayrulah
Enthusiast
Enthusiast
Jump to solution

Capture.JPG

Reply
0 Kudos
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

That copyback path is set in the following variable:

$script:CopyPath = [Environment]::GetFolderPath("MyDocuments")+"\ExtrasFromPersistentDisk"

You could just change that one line to a folder that you know is local and not redirected to one drive. The variable CopyPath is used for the copyback process.   Here are some examples of other special folders:  Environment.SpecialFolder Enum (System) | Microsoft Docs

You could even use a path like c:\My Folder\ExtrasFromPersistentDisk.

Thanks

Chris

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
shayrulah
Enthusiast
Enthusiast
Jump to solution

Find out that this error message is more likely registry related. I think when all the registries are imported back from DEM they are still pointing to E:\users\username\One Drive folder and cannot load the profile.

Reply
0 Kudos
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

Did you run the following?  DEM_Update_MigZip - Samples - VMware {code}

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
Reply
0 Kudos
shayrulah
Enthusiast
Enthusiast
Jump to solution

Yes followed all the steps from DEM_Update_MigZip - Samples - VMware {code}.

I can confirm that it works perfectly with profiles which are not backed up with One Drive.

In out environment One Drive is used for backing up users Desktop and Documents folders for example E:\user\username\OneDrive......

I think registries which are exported from old persistent machine are still pointing to this E:\ driver (Persistent Disk) and this causes the error message and profiles get corrupted.

Reply
0 Kudos
shayrulah
Enthusiast
Enthusiast
Jump to solution

When you have time you can test it on your side. start one drive and choose to backup desktop and documents and then try to migrate persistent profile to FSLogix and you will see the issue.

Reply
0 Kudos
chrisdhalstead
VMware Employee
VMware Employee
Jump to solution

We will test this scenario  - we plan on providing updates to the document.  Thank you for the feedback

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
Reply
0 Kudos
shayrulah
Enthusiast
Enthusiast
Jump to solution

Hi Chris is there any progress on this issue? 

Reply
0 Kudos