The estimated reading time 1 minutes
When you configure UPD (User Profile Disk) in Server 2012R2 RDS environments, lots of people are not able to identify which .vhdx file belongs to which user. For this reasen here are some methods to get the knowledge you need.
First thing to know is where to find the UPD. You can get this piece of information from the deployment.
If you know where to look you can find the .vhdx files on this path
to prevent any upcomping problems I copy the SID from the vhdx file into notepad.
NOTE: not the complete name of the vhdx file, only the part with S-1-…….
Before we go into the powershell we need to setup the command following
$objSID = New-Object System.Security.Principal.SecurityIdentifier ` ("S-1-5-21-XXXXXXXXX-XXXXXXXXXXXXXXXX") $objUser = $objSID.Translate( [System.Security.Principal.NTAccount]) $objUser.Value
please replace the XXXXX with the copied SID from your vdhx file. For more information see Technet
In my example this command shows the username
If you want to do this the other way round there is also a simple way to find out which SID belongs to which user
$objUser = New-Object System.Security.Principal.NTAccount("NETBIOSDomainXX", "Username") $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $strSID.Value
There are some other way to get the sid to user assigment I know about that.
I’m looking forward to your comments.