From my previous articles of Windows Virtual Desktop series, I have discussed step by step on Implementing prerequisites, configuring Azure tenant, Creating WVD tenant, and creating Windows 10 multisession Host pools. Also, I have covered how to access the host pool through Web, Client app, and mobile devices such as Android or iOS. From this article, I’m continuing the additional configurations of Windows Virtual Desktop to discuss step by step on configuring User Profiles using FSLogix profile containers and Azure Files while using the Local Active Directory Authentication. Please refer to the previous posts if you miss any configurations.
01 – Working remotely and efficiently with Microsoft technologies
02 - Windows Virtual Desktop | Configuring Prerequisites and WVD Tenant Creation
If you are familiar with Remote Desktop or VDI solution, you already know User profiles can’t persist, they should configure as roaming profiles and can be accessed through any server, desktop or session where the user connecting from. The same scenarios apply to WVD. The Windows Virtual Desktop service offers FSLogix profile containers as the recommended user profile solution. Microsoft doesn’t recommend the User Profile Disk solution anymore. (UPD)
FSLogix is a set of solutions that enhance, enable, and simplify non-persistent Windows computing environments. FSLogix solutions are appropriate for Virtual environments in both public and private clouds. FSLogix solutions include:
With the FSLogix solution, Microsoft recommends the following 3 methods for User Profiles. I prefer using Azure Files so this article will cover FSLogix user profiles with Azure Files.
Azure Files is a fairly simple solution to implement. Its scalable on-demand, you need to create a Storage Account and a file share. Storage accounts are now supported AD Join, not from GUI but using PowerShell it can be joined to the Active Directory, so we can use SSO with ACL/NTFS permissions. Before implementing user profiles, you should have an up and running WVD environment and a configured host pool. Refer to my previous posts on implementing and configuring the WVD setup.
Prerequisites
At this moment domain, join of Storage Accounts only supported through PowerShell Module AzFilesHybrid. So, it should be imported to your PowerShell together with the AZ module. Its a bit complex so I will explain in step by step. Also, you need to run this from a Domain Join machine, the same domain where your Host Pool exists. for this exercise, I’m installing the module and running the PowerShell commands through my domain controller in Azure VM.
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Click Run once and Yes to All
Select-AzSubscription -SubscriptionId <subscription-id>
Please note you need to run this from domain-joined, domain admin (domain join rights) account.
join-AzStorageaccountForAuth -ResourceGroupName "<resource-group-name>" -Name "<storage-account-name>" -DomainAccountType "ComputerAccount" -OrganizationalUnitName "<OU--FRIENDLY-NAME>"
Login to the Active directory Users and Computers to make sure the Computer account is created.
Next, find the Storage Account from Azure and open Properties. You can see Active Directory is Enabled and your domain name is displayed.
Storage Account | Access control (IAM)
You can grant this role to the users with user profiles
This role has additional access to the NTFS/ACL permissions. This can be an administrator who set up the NTFS permissions.
If everything correctly configured, you can access the file share.
Configuring NTFS/ACL Permissions – additionally, you need to configure the NTFS permissions on the Azure files so only the owner of the specific profile can be accessed. This can be configured by the Account control list of NTFS permissions on the share.
You can change the current permissions according to the above rights. More - https://docs.microsoft.com/en-us/fslogix/fslogix-storage-config-ht
Here are my configurations
To implement the FSlogix profile container, you need to install the FSlogix client in the VM Pool. This is an agency where you can download and install in each VM in the pool or centrally deploy through GPO. Configurations can be managed by GPO or registry edit. For this exercise, I’m doing everything from GPO. Use the following link to download the agent and GPO Template
Download - FSLogix Agent and ADMX GPO Template
GPO –Create new GPO - Computer Configuration -> Windows Settings -> Scripts -> Startup. Click on Show Files and place the .EXE in the folder.
To install the agent manually, copy the FSLogixAppSetup, and run the EXE.
Copy Fslogix.adml file to C:\Windows\PolicyDefinitions\en-US
Copy Fslogix.admx file to C:\Windows\PolicyDefinitions
Enabled – Enabled
VHD Location – Enabled, VHD Location - \\xxxx.file.core.windows.net\fileshare
Delete local profile when FSLogix profile should apply
Size in MB’s – profile size
To test the end-user experience, login to the FSLogix profile pushed VM (GPO) using a user account which is having a Storage File Data SMB Share Contributor role.
Go to disk management, when the profile is loaded, it can be located as an attached disk.
Also, from the Azure portal side, you can see a profile container is created in Azure Files.
Also, don’t forget to test NTFS /ACL permissions we configured previously. Browse the file share using the file path of the profiles i.e - \\xxxx.file.core.windows.net\fileshare\ . then try to access some other profile in which the user doesn’t have access rights. It should be denied. If you can access, just go through again the above configured NTFS permissions.
With that final configuration, you are now having user profiles that are available in any VM where the user connected. Also, it’s using SSO of AD authentication and user experience is the same as they work in a local machine. My documents, Desktop, and other personal folders will automatically re-directed and saved in an Azure File share. This Azure File share can be backed up and scaleup or scale down.
I know It’s quite a long article, but I want to describe every tiny bit of information about the configurations. Hope this post is useful
Cheers