Share via


Tutorial: Create and implement redirections.xml

In this tutorial, you learn how to create and implement redirections.xml.

Using non-Microsoft redirections.xml files can exclude items that can affect proper operation of the operating system or applications in your environment. Use exclude and include statements sparingly.

FSLogix redirections.xml provides functionality that allows some parts of a user's profile to be excluded from a user's container. This tutorial provides you with the steps to create your own .xml file to exclude the recommended Microsoft Teams folders.

In this tutorial, you:

  • Exclude recommended Microsoft Teams folders for Virtualized Desktop Infrastructure (VDI).
  • Verify that the .xml file was copied from the source folder.
  • Verify that the folders were excluded.

Prerequisites

Create the redirections.xml file

  1. Select Start.

  2. Enter notepad in the Start menu search box.

  3. Select Notepad on the Start menu.

    Screenshot that shows Notepad.

    Figure 1: Notepad on the Start menu

  4. Copy the .xml outline to Notepad.

    You can find information on ExcludeCommonFolder in the Custom profile redirections.xml article.

    <?xml version="1.0" encoding="UTF-8"?>
    <FrxProfileFolderRedirection ExcludeCommonFolders="0">
    <Excludes>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\media-stack</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Teams\meeting-addin\Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs</Exclude>
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs</Exclude>
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage</Exclude>
    </Excludes>
    <Includes>
    </Includes>
    </FrxProfileFolderRedirection>
    
  5. Select File > Save As.

  6. Go to the file share where the .xml file source is saved.

  7. Enter redirections.xml1 for the file name.

  8. Select All Files (.) for the Save As type.

  9. Select Save.

Note

Users require read access to the file share where the .xml file is stored. Users without read access can't copy the .xml file during sign-in.

Configure redirections.xml on the virtual machine

  1. Sign in to the virtual machine as a local administrator or with an account that's a member of the local administrators group.

  2. Enter registry editor in the search box.

  3. Select Registry Editor on the Start menu.

    Screenshot that shows Registry Editor on the Start menu.

    Figure 2: Registry Editor on the Start menu

  4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles.

  5. Add these settings:

    • Value name: RedirXMLSourceFolder
    • Value type: REG_SZ
    • Value: \\<server-name>\<share-name>2

    Screenshot that shows registry profiles.

    Figure 3: Registry profiles

Verify redirections.xml is copied and excluding folders

  1. Go to C:\ProgramData\FSLogix\Logs\Profile.

  2. Open Profile-%date%.log.

  3. Find the section that starts with [INFO] ===== Begin Session: StartShell.

  4. If the redirections.xml file was successful, the log should be similar to the logs shown here:

    [23:36:31.364][tid:00000f10.00003bdc][INFO]             Configuration Read (REG_SZ): SOFTWARE\FSLogix\Profiles\RedirXMLSourceFolder.  Data: \\<stg-acct>.file.core.windows.net\containers
    [23:36:31.364][tid:00000f10.00003bdc][INFO]             Attempting to copy: "\\<stg-acct>.file.core.windows.net\containers\Redirections.xml" to: "C:\Users\%username%\AppData\Local\FSLogix\Redirections.xml"
    [23:36:31.396][tid:00000f10.00003bdc][INFO]             Redirections.xml copy success
    [23:36:31.396][tid:00000f10.00003bdc][INFO]             Reading profile folder redirections
    [23:36:31.411][tid:00000f10.00003bdc][INFO]             Creating base folders for profile folder redirections
    [23:36:31.411][tid:00000f10.00003bdc][INFO]             Creating base folder 'AppData\Roaming\Microsoft\Teams\media-stack\'
    [23:36:31.427][tid:00000f10.00003bdc][INFO]             Creating base folder 'AppData\Local\Microsoft\Teams\meeting-addin\Cache\'
    [23:36:31.427][tid:00000f10.00003bdc][INFO]             Creating base folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\'
    [23:36:31.427][tid:00000f10.00003bdc][INFO]             Creating base folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs'
    [23:36:31.427][tid:00000f10.00003bdc][INFO]             Creating base folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Adding exclude rule for folder 'AppData\Roaming\Microsoft\Teams\media-stack\'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Added redirection C:\Users\%username%\AppData\Roaming\Microsoft\Teams\media-stack -> C:\Users\local_%username%\AppData\Roaming\Microsoft\Teams\media-stack
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Adding exclude rule for folder 'AppData\Local\Microsoft\Teams\meeting-addin\Cache\'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Added redirection C:\Users\%username%\AppData\Local\Microsoft\Teams\meeting-addin\Cache -> C:\Users\local_%username%\AppData\Local\Microsoft\Teams\meeting-addin\Cache
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Adding exclude rule for folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Added redirection C:\Users\%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs -> C:\Users\local_%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Adding exclude rule for folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs\'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Added redirection C:\Users\%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs -> C:\Users\local_%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Adding exclude rule for folder 'AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage\'
    [23:36:32.099][tid:00000f10.00003bdc][INFO]             Added redirection C:\Users\%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage -> C:\Users\local_%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage
    

1 The file name isn't case sensitive.
2 Don't include the file name. The path could also be a local path if the .xml file is part of a gold image.

Next step