As many of you know, using Office 365 Exchange Online in a non-persistent environment like Citrix XenApp can be really difficult. Because the Exchange server is in the cloud, connection to the mailbox and searching through mail is really slow. An easy way to fix this is to use an Outlook Cache file (OST). This will make a local copy of your email box in your profile. This is a good solution if you use local profiles, but in a non-persistent environment you will probably use a profile solution, like roaming profiles or zero profiling etc. and then using OST Files won’t work. Because the OST files can easily grow to multiple GB’s it’s not a good idea to save it in a roaming profile solution. This will of course impact the logon time dramatically. So what can you do?
You can redirect the OST file to a network mapping, but because the OST files generate a lot of SMB traffic your file server will overload quickly. This will lead to slow and corrupt OST files which means re-downloading your complete cache. The best way to solve the issue is to create a VHD (Virtual Hard Drive) for each user, attach the VHD file when the user signs in and then redirect the OST file to the virtual drive. This will create just one SMB connection on the file server per user. Ivanti has built this solution for their new Ivanti User Workspace Manager. But what if you still use Ivanti Workspace Control(IWC) / RES ONE Workspace (ROW)? Now you can use the scripts below or download the building blocks to use VHD files for OST caching with IWC or ROW. These scripts will not fix the search indexer nor do they enable roaming of One Drive files. These features are possible with other solutions or the new Ivanti User Workspace Manager.
The first script will check if the user already has a disk. If not, it will create a disk. It will set the correct rights, mount the disk and redirect the default OST location to the VHD file. You only need to change line 2 to the location where you want to save the VHD files. This script must be run on sign in. *Scripts tested on Windows 2016 XenApp.
The second script will unmount the VHD from the system and removes the symbol links. You must run this script on sign off.
I hope this was informative. For questions or comments you can always give a reaction in the comment section or contact me: