Forum Discussion

Roger Critz's avatar
Roger Critz
Copper Contributor
Oct 22, 2019
Solved

Convert UPD to FSLogix container

We are wanting to move our users from RDS to WVD without losing or redoing the the profiles. Is there a way to convert the traditional RDS UPD profile (VHD) to a FSLogix profile container (Would like to make it a VHDX, if that is not possible then VHD to VHD)?

 

Thank you in advance..

  • Roger Critz we will be starting a private preview for a PowerShell script to accomplish this.  I will post the specifics here when available.  The Private Preview will be for those moving from on-prem to WVD, which is the use case you describe.  The current plan is for this PowerShell to ultimately move to an open source repo to be extended by the community.  Thanks!

25 Replies

  • adamsi175's avatar
    adamsi175
    Copper Contributor

    Roger Critz 

     

    OK so here is what I have so far. It's actually functional and I think anyone can run it in their environment.

     

    It will get the list of files for X:\Path\UVHD-<SID>.vhdx and then give you X:\Path\SAM_SID\Profile_SAM.vhdx

     

    It takes about 11 seconds per VHDX file. There's a 5-second delay on the mount and dismount step just to make sure that process has completed before moving onto the next file.

     

    There's one problem in my environment but it's not the code itself. About 1 in 20 source VHDX files fail to mount. e.g. Mount-Diskimage -ImagePath X:\Path\to\the\file.vhdx. The error is 0x80070005.

     

    I've tried on multiple servers and accounts. It's not NTFS permissions or lack of admin rights. I haven't found the cause yet.

     

    If you comment out the part where it does any actual changes and leave only the mount and dismount sections then you can see if you're okay to proceed in your environment. If anyone has any idea why some files fail to mount I'd like to hear. That's the reason I am sharing this now 🙂

     

    Edit: Just as follow up... if anyone wants to quickly see if they'll have Mount-DiskImage issues then you can use the below.

     

    $tests = Get-ChildItem "X:\Path" -File -Filter UVHD-S*.vhdx | Sort Name

    New-Item -Path "X:\Path" -ItemType File -Name 'aaaa.txt'

    ForEach ($test in $tests){
    Write-Host "This is "$test.FullName -ForegroundColor Green
    Mount-DiskImage -ImagePath $test.FullName -ErrorAction SilentlyContinue -ErrorVariable MountError | Out-Null;
    If ($MountError){
    Write-Host "Failed to mount" $test.FullName -ForegroundColor Yellow
    Add-Content -Path "X:\Path\aaaa.txt" -Value $test.FullName
    }
    Dismount-DiskImage -ImagePath $test.FullName | Out-Null
    }

     

     

     

    • jerrywilkinson's avatar
      jerrywilkinson
      Copper Contributor

      I was able to convert my UPD's but when i try to login using FSLogix the login doesnt attach to the new VHDX . Is there something you need to do after to get it to attach properly? adamsi175 

  • Joost_Jansen's avatar
    Joost_Jansen
    Copper Contributor

    We are looking for this script as well! Would you share it when it's available? 

  • Roger Critz we will be starting a private preview for a PowerShell script to accomplish this.  I will post the specifics here when available.  The Private Preview will be for those moving from on-prem to WVD, which is the use case you describe.  The current plan is for this PowerShell to ultimately move to an open source repo to be extended by the community.  Thanks!

Resources