If you are using the Microsoft Deployment Toolkit (MDT) to build your Reference Images and Citrix Master Images, you are most certainly trying to include the Microsoft Visual C++ Redistributables for Visual Studio into your Reference Images. Recently I switched to the VcRedist PowerShell Module by Aaron Parker to achieve this task and with this blog post I’m going to show you how to do this yourself.
This post assumes that you already have a working MDT setup up and running and are familiar with the concept of Reference and Master Images. This post will only describe one possible way of how to include the VcRedist module into your MDT workflow.
The PowerShell Code used by me for the integration with MDT, can be found at my GitHub repository: https://github.com/xenadmin/applications/tree/master/Microsoft/MDT-VcRedist
First grab the VcRedist-Install.ps1 from my GitHub repository, adjust the variables according to your needs and execute the script:
The result will look similar to this:
Add the Bundle Microsoft Visual C++ Redistributables to your MDT Task Sequence or to a new Bundle, if you install any more Dependencies and Runtimes:
To make the VcRedist Bundle evergreen, grab the second script VcRedist-Update.ps1 from my GitHub repository and add it to your Task Scheduler:
The command for the Task Scheduler task is:
powershell.exe -ExecutionPolicy Bypass -File "C:\Source\Scripts\VcRedist-Update.ps1"
All credits for the VcRedist PowerShell module and the excellent documentation of it go out to Aaron Parker. This blog post just shows how easy it is to use and one way to use it with MDT Reference Images.
If you do have any question or comments, please put them below. Thank you!