none
Still have users getting logged in with Temporary Profiles using UPD RRS feed

  • Question

  • Hello,

    I keep waiting for a hotfix or a cure for an issue we have for quite some time with our Windows 2012R2 RDS Farm. It seems that about 10% of the users are getting logged in on a daily basis with temporary profiles. The UPD store has the correct permissions and everything seems to be setup correctly. Often times the users that are new are not getting a UPD created and instead are using a temp profile. It seems that sometimes we have to go to Edit the Properties of the Collection and turn UPD off click Save and then turn UPD on again and this will have an effect (maybe we are just imagining this).

    Anyway we are hoping to continue to use UPD, but we need it to be more reliable.

    Thank you


    Steve J.


    • Edited by dsgslj Thursday, August 11, 2016 6:45 PM
    Thursday, August 11, 2016 6:38 PM

Answers

All replies

  • Hi Steve,

    Thanks for your post.

    To fix the problem, please try to follow the instruction of the article below:

    Fix temporary profile issue on 2012 remote desktop server

    http://www.stevenjordan.net/2014/06/fix-temporary-profile-issues-on-2012.html

    In addition, here is an article below about how to configure UPD for your reference.

    User Profile Disks for RDS 2012 / 2012 R2

    https://thewolfblog.com/2014/02/24/user-profile-disks-for-rds-2012-2012-r2/

    Best Regards,

    Jay


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, August 12, 2016 2:20 AM
    Moderator
  • Thank you Jay, but I have been through your first suggestion before and followed the steps exactly in the Wolf Blog when setting up.

    I believe that there is a "bug" in UPD and here is why. Twice now we have brought in a new batch of users. These users belong to the same Domain groups as the others users. When these users access the RDS farm they are getting logged in with Temp profiles. Here is what we have done to resolve this issue twice now.

    Go to Edit the Properties of the Collection. Turn off UPD, click Apply (do not close the Properties Window). Then Click to turn On UPD and click Apply and then close. After doing this twice now, the newest batch of users start getting UPDs.

    All 5 RDS servers are up to date with Windows updates including Roll Ups.


    Steve J.

    Friday, August 12, 2016 1:26 PM
  • Hello Steve,

    I feel your pain. One of the major reasons why we left App-V behind is the UPD's and temp profiles. We were getting the temp profiles and now we don't as often, instead we get random errors as people try to login. We found that if the UPD is locked then the user cannot login, and they will receive an error from a pool of errors I have noticed.  I found a Microsoft application called Sidder, and it will at least show you what UPD's are in a locked state and translate the SID to a username. That helped a little. The way around the temp profiles is to unmount the disk so they can login. The big issue is that you don't know what machine the disk is mounted to, so unless you want to look all all of the vms one at at time you need something else. So I built this powershell script:

    do
    {
    Import-Module Hyper-v
    Import-Module RemoteDesktop
    Import-Module ActiveDirectory

     Get-VM -ComputerName RDVH -Name VMS*  | select -ExpandProperty HardDrives  | where path -like '*\\VDIUPD*' -OutVariable drives | Out-Null
         Foreach ($drive in $Drives){ 
          $date = get-date                                                                                                                          
         $sid = $drive.path.split('\')[4]                                                                                                                                                                                                                                                                         
         $sid =$sid.replace('.vhdx','')                                                                                                                                      
         $sid =$sid.replace('UVHD-','')                                                                                                                                      
         Get-ADUser -Identity $sid  | select -ExpandProperty SamAccountName  -OutVariable UserDisks | Out-Null
          Add-Content -Path C:\Unmount-log.txt -Value "We have noticed a disk for $userDisks is still attached. This was noticed on $date"
        Write-Output "Starting 5 min Sleep"
         Start-Sleep -Seconds 300 
         Get-RDUserSession -CollectionName CollectionName | Where Username -eq $UserDisks -OutVariable loggedinUsers | Out-Null
        $date = get-date 
                 IF ($loggedinUsers.count -lt 1){

                     Add-Content -Path C:\Unmount-log.txt -Value "We have unmounted a disk for $userDisks at $date"
                     Remove-VMHardDiskDrive -VMName $drive.VMName -ControllerType $drive.ControllerType -ControllerNumber $drive.ControllerNumber -ControllerLocation $drive.ControllerLocation -ComputerName RDVH

                         }
        }
     Write-Output "Starting 15min sleep"
     Start-Sleep -Seconds 900 
     }
    until ($x -gt 0)  

    The above is a do loop that never stops. But what it will do is grab and UPDs that are mounted and search for any open sessions. If a mounted UPD is paired to an open session do nothing but if it finds no session unmount the UPD. This has seemed to correct most of our issues. I put in some sleep times because we found that if it runs too fast there is a small period of time where the disk gets mounted before the session is active, so it would unmount the UPD in the middle of the connection being initiated. I know this not a great solution, but it is what we have for now.

    Friday, August 12, 2016 3:59 PM
  • Thank you for sharing Skeeter. For us the problem is a little different. For some new users, they just don't get their initial UPD file/profile created and they start off day one using a temp profile. To fix this we have found that we have to Turn Off UPD wait a few seconds and then Turn UPD back on. Strange huh?

    Steve J.

    Friday, August 12, 2016 4:03 PM
  • Hi Steve,

    Here is a similar thread below, someone resolved the problem with different method, you could try them.

    https://social.technet.microsoft.com/Forums/office/en-US/68bc8da5-c7bc-403e-97e0-ba48a9cb17a2/2012-r2-rds-temporary-profile-issue?forum=winserverTS

    Best Regards,

    Jay


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, August 24, 2016 1:14 PM
    Moderator