Cache Office 365 Outlook with Ivanti Workspace Control/ RES ONE Workspace in non-persistent environments, Building Blocks included!
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.
Download the scripts as Ivanti Workspace Control / RES ONE Workspace Building Blocks here.
The second script will unmount the VHD from the system and removes the symbol links. You must run this script on sign off.
Download the scripts as Ivanti Workspace Control / RES ONE Workspace Building Blocks here.
I hope this was informative. For questions or comments you can always give a reaction in the comment section or contact me:
Hi Chris,
This is a great article. Thank you very much. But one question: Why does this solution not work with the Onedrive Cache? FSLogix for example also maps a virtual Disk and redirects the content to the disc. Is there a technical limiation?
Regards,
Simon
Yes it’s a technical limitation. To redirect OneDrive You need to redirect parts of the registry etc. that’s off course the Secret sauce of the other solutions
Hi Chris,
Thank you very much for this. I am currently testing it in my UAT env and when res runs I get a prompt for creds for Powershell, I can see that the building block is configured to run with elevated rights.
Any ideas?
Thanks,
Mark
Yes you need to run with the elevated rights option. So you need the security module from res to be active. Other way would maybe be take the PowerShell script and try to run it from GPO before res starts.
Thanks Chris. Does this require a minimum version of RWM to run?
It’s tested with from 10.1 but I think it will work with lower versions
Could you give more info as to what you mean by “So you need the security module from res to be active.” please? I want to make sure we have that active. Thanks!
Hi mike,
The security module is an license feature. It enables you to run the script elavated by adding administrative rights.
Gr Chris
Thanks, did you write these scripts? I am wondering who I could email to get some support? It looks to be pretty close to working however I am running up against a wall as %localappdata%\Microsoft\Outlook doesn’t exist to the user at login and I believe that needs to be present for the script to function. I am thinking I need to create this local folder for the user before the script runs, I could capture the folder with IWC but that wont work as it will capture the OST inside the folder which is the whole point of this 🙂 Thanks!
I am all set, had to do some hacking to get the scripts to function on WIndows 7.
Thanks
OneDrive has an option to change to cache location by Admx file. You Could change the OneDrive location to this new vhdx path i assume. I Couldn’t see Why that is not working. Same for Chrome, you could assign a profile path from within an group policy setting.