Поділитися через


Tutorial: Create and implement redirections.xml

Tip

Using third party redirections.xml files can exclude items which can affect proper operation of the OS or applications in your environment. Exclude and include statements should be used 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.

Learn how to

  • Exclude recommended Microsoft Teams folders for VDI
  • Verify the XML file has been copied from the source folder
  • Verify the folders have been excluded

Prerequisites

Create the redirections.xml file

  1. Select Start

  2. Type notepad directly into the Start Menu.

  3. Select Notepad from the Start Menu.

    notepad

    Figure 1: Notepad in Start Menu

  4. Copy the XML outline to Notepad.

    <?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 are saved.

  7. Type 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 will not be able to copy the XML file during sign in.

Configure redirections.xml on the virtual machine

  1. Sign in to the virtual machine as the local Administrator account or an account that is a member of the local Administrators group.

  2. Type registry editor in the Search box.

  3. Select Registry Editor from the Start Menu.

    registry start menu

    Figure 2: Notepad in Start Menu

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

  5. Add this setting:

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

    registry profiles

    Figure 3: Notepad in Start Menu

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 starting with: [INFO] ===== Begin Session: StartShell

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

    [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 filename is not case-sensitive.
2 Do not include the file name. The path could also be a local path if the XML file is part of a gold image.

Next steps