11-16-2018, 02:38 AM
The attached extension allows to mount a VHD at logon, and use it to cache (large amounts) of files efficient. This is way more efficient than using them on a (redirected) networkshare. It mounts the VHD-disk to the B:-drive (you never used it in the past years anyway, right?). After mounting, use this drive to store your cache files
One of the most practical uses for this extension would be mounting the VHD and place the Office 365 Cache files (Outlook OST, OneNote caching, ...) to this disk. But it could also be the cache for a CAD application. If the VHD could not be mounted (already in use on another system?), it SUBSTs a temp folder to hold the cache.
There are a few restrictions to this extension:
One of the most practical uses for this extension would be mounting the VHD and place the Office 365 Cache files (Outlook OST, OneNote caching, ...) to this disk. But it could also be the cache for a CAD application. If the VHD could not be mounted (already in use on another system?), it SUBSTs a temp folder to hold the cache.
There are a few restrictions to this extension:
- It uses powershell, so it will only work on Win8.x/10/Server 2012/2016
Similar: the used simple approach of mounting it to the B:-drive does not work in Multi-user situations (RDS servers, …)
- The demo uses a VHD on the (local) D:-trive (demo purposes)
Change the location in the mount (@logon) and unmount (@logoff) extensions
- The VHD has to exist, it has to be formatted and the drive assignment for the partition has to be B:
The script only mounts the disk, it does not assign the driveletter (who extends the script). Similar the SUBST-fallback-action should be part of the mount-process, so it is a single activity. I left it separate as the SUBST can be practical in other situations as well.
- It could be desired to have a template-copy operation.
Create a template VHD, put it in a common location and during the mount, if the disk should be mounted but not yet exists: copy the template...