Problem:
When using ProfileDisk VHD and Microsoft Teams the ProfileDisk VHD disk size may bloat.
Symptoms:
The profiledisk size on disk may bloat though in session may not show, this is because Teams add and deletes data i the Profiledisk VHD causing it to consume those blocks on disk.
Possible Resolution(s):
684 has this built into the new templates
In ProfileUnity 6.8.3R2 we have prebuilt exclusions in the current Portability rule Application Data - 6.8.3 - Windows Settings. These are:
Merge Application Data Microsoft
Merge Application Data identities
Exclude Application Data Microsoft\Windows\Themes\*Wallpaper*.*
Exclude Application Data Microsoft\Windows\Cookies
Exclude Application Data Microsoft\Credentials
Exclude Application Data Microsoft\Protect
Exclude Application Data Microsoft\Windows\Recent
Exclude Application Data Microsoft\Windows\SendTo
Exclude Application Data Microsoft\Windows\Start Menu
Exclude Application Data Microsoft\Windows\Themes
Exclude Application Data Microsoft\Templates
Exclude Application Data MIcrosoft\Document Building Blocks
Exclude Application Data Microsoft\Bibliography
Exclude Application Data Microsoft\Teams\Application Cache
Exclude Application Data Microsoft\Teams\Cache
Exclude Application Data Microsoft\Teams\blob_storage
Exclude Application Data Microsoft\Teams\databases
Exclude Application Data Microsoft\Teams\Indexeddb
Exclude Application Data Microsoft\Teams\Local Storage
Exclude Application Data Microsoft\Teams\tmp
Exclude Application Data Microsoft\Teams\Service Worker\CacheStorage
Exclude Application Data Microsoft\Teams\Service Worker\ScriptCache
Pre 6.8.3R2 you can augment the portability rule for Application Data - "version" - Windows Settings to add these:
Exclude Application Data Microsoft\Teams\Application Cache
Exclude Application Data Microsoft\Teams\Cache
Exclude Application Data Microsoft\Teams\blob_storage
Exclude Application Data Microsoft\Teams\databases
Exclude Application Data Microsoft\Teams\Indexeddb
Exclude Application Data Microsoft\Teams\Local Storage
Exclude Application Data Microsoft\Teams\tmp
Exclude Application Data Microsoft\Teams\Service Worker\CacheStorage
Exclude Application Data Microsoft\Teams\Service Worker\ScriptCache
In addition the following also needs to occur:
The following picture shows a series Application Launcher rules that need to be added into the config. These should run after the existing rules that create, and set the ProfileDisk_Temp Location as part the ProfileDisk Default template similar to below.
For these they should follow this syntax.
Rule 1
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c if not exist "%appdata%\Microsoft\Teams" mkdir "%appdata%\Microsoft\Teams"
Rule 2
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c if not exist "%systemdrive%\ProfileDisk_Temp\%username%\ProU_PD_Excludes\AppData\Local\Microsoft\Teams\Service worker" mkdir "%systemdrive%\ProfileDisk_Temp\%username%\ProU_PD_Excludes\AppData\Local\Microsoft\Teams\Service worker"
Rule 3
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c icacls.exe "%systemdrive%\ProfileDisk_Temp\%username%" /grant "%username%":(OI)(CI)F /inheritance:r & icacls.exe "%systemdrive%\ProfileDisk_Temp\%username%" /grant "system":(OI)(CI)F /inheritance:r & icacls.exe "%systemdrive%\ProfileDisk_Temp\%username%" /grant "administrators":(OI)(CI)F /inheritance:r
Rule 4
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c mklink /D "%appdata%\Microsoft\Teams\Service Worker" "%systemdrive%\ProfileDisk_Temp\%username%\ProU_PD_Excludes\AppData\Local\Microsoft\Teams\Service worker"
Rule 5
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c attrib +H "%systemdrive%\ProfileDisk_Temp"
Rule 6
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c REG ADD HKCU\Environment /v TEMP /t REG_EXPAND_SZ /d "%systemdrive%\ProfileDisk_Temp\%username%" /f
Rule 7
FileSpec:
%systemroot%\system32\cmd.exe
Argument:
/c REG ADD HKCU\Environment /v TMP /t REG_EXPAND_SZ /d "%systemdrive%\ProfileDisk_Temp\%username%" /f
Product: ProfileUnity
Product Version: 6.8.0-6.8.3