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
- Review: Classic Teams for Virtualized Desktop Infrastructure
- Review: Upgrade to new Teams for Virtualized Desktop Infrastructure (VDI)
Create the redirections.xml file
Select Start
Type
notepad
directly into the Start Menu.Select Notepad from the Start Menu.
Figure 1: Notepad in Start Menu
Copy the XML outline to Notepad.
- Information on
ExcludeCommonFolder
can be found 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>
- Information on
Select File -> Save As...
Go to the file share where the XML file source are saved.
Type redirections.xml1 for the file name.
Select
All Files (*.*)
for the Save as type.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
Sign in to the virtual machine as the local Administrator account or an account that is a member of the local Administrators group.
Type
registry editor
in the Search box.Select Registry Editor from the Start Menu.
Figure 2: Notepad in Start Menu
Go to:
HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles
Add this setting:
- Value Name:
RedirXMLSourceFolder
- Value Type:
REG_SZ
- Value:
\\<server-name>\<share-name>
2
Figure 3: Notepad in Start Menu
- Value Name:
Verify redirections.xml is copied and excluding folders
Go to:
C:\ProgramData\FSLogix\Logs\Profile
Open
Profile-%date%.log
Find the section starting with:
[INFO] ===== Begin Session: StartShell
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.