Welcome to the Liquidware Community Site.
Current and Future Clients/Partners are Welcome.

Using Computer System Variables to Target File Servers for Folder Redirection

lwl_gpeck
lwl_gpeck ✭✭✭

A customer asked recently about targeting a different file server for folder redirection for different business units. Thinking strictly within the confines of a UEM tool there might be lots of different configurations and filters that might be needed to achieve this. However, when you look at pairing group policy and ProfileUnity together you get a solution like this that is easy to manage and even automate. 


The Challenge

Each business unit, although sharing the same Active Directory, must be autonomous with the computing resources. Application and file server are not shared between the business unites. Folder Redirection must utilize the file server assigned to the business unit while keeping the configuration of ProfileUnity simple. Each business unit has a virtual desktop pool that is assigned as well as specific IP address ranges. 


The Solution

Within ProfileUnity the desire is to make it easy to use and reduce the number of configurations. This is simple if we utilize computer environment variables. In a Folder Redirection rule, the Redirected to Folder path can utilize computer variables. For the Desktop Redirection rule, 

  • Shell Folder: Desktop
  • Redirected to Folder: \\%FileServer%\Redirected\%username%\Desktop


These settings can be repurposed and modified for other folder redirection rules. We are simply utilizing this one for an example. 


Save the settings and publish as you normally do. For this folder redirection rule to work, the %FileServer% variable needs to be set. Let’s do that next. 



Environment Variable Set by Machine Name

The GPO utilizes Item Level targeting to detect the computer name and set the system variable. This section details the GPO creation process. This GPO is created at the highest level of VDI objects and should be enforced to be able to bypass any GPO blocking downstream.


  1. Create a GPO according to the organizational standards.
  2. Set the GPO to enforced
  3. Edit the GPO to set the environment variable.
  4. Open Computer Configuration > Preferences > Windows Settings > Environment
  5. Create a New > Environment Variable
  6. On the General tab, create a System Variable, i.e. FileServer
  7. For the Value, enter the file server FQDN for Business Unit 1
  8. On the Common tab, select Item-level targeting and click Targeting
  9. Select Computer Name from the New Item drop down. In the Targeting editor, enter the base computer name for the virtual desktop pool in the Computer Name box, ensure there is an asterisk to include all computers with that base name. Click OK to save
  10. Repeat steps 5 through 9 for each file server and base computer name combination


Environment Variable Set by IP Address Range 

The GPO utilizes Item Level targeting to detect the computer name and set the system variable. This section details the GPO creation process. This GPO is created at the highest level of VDI objects and should be enforced to be able to bypass any GPO blocking downstream.


  1. Create a GPO according to the organizational standards.
  2. Set the GPO to enforced
  3. Edit the GPO to set the environment variable.
  4. Open Computer Configuration > Preferences > Windows Settings > Environment
  5. Create a New > Environment Variable
  6. On the General tab, create a System Variable, i.e. FileServer
  7. For the Value, enter the file server FQDN for Business Unit 1
  8. On the Common tab, select Item-level targeting and click Targeting
  9. Select IP Address Range from the New Item drop down. In the Targeting editor, enter the Beginning IP address and the Ending IP Address for the business unit. Click OK to save
  10. Repeat steps 5 through 9 for each file server and base computer name combination


Summary

When a virtual desktop is deployed and receives a Computer Name or IP Address that is assigned to the business unit, the group policy sets the system variable accordingly and ProfileUnity utilizes that value to redirect folders to the proper business unit file server. One ProfileUnity configuration, one Group Policy. With each additional business unit, simply add an entry to the group policy. 



Greg Peck - Senior Solutions Architect - Liquidware