I finally had some time left so I wrote this small script to help me build my lab environment (and help me automate at customer sites) instead of building it manually. The script will not replace any hydration script instead it may interact with an existing MDT environment. It will download the source from a HTTP/FTP source, extract it if needed and import it into a MDT environment. Every thing is ruled by an XML file where you define your own list of applications with your command lines and switches. Are you a consultant? Why not use the script to get your customers up and running faster?
All credits to Mikael Nystrom where I got the initial idea long time ago
The solutions is built upon to files
- ImportApplicationToMDT.ps1
- Download.xml
The PowerShell script is the logic that will download and import the applications you define in Download.xml.
The script is in no sense perfect and have limited error control. If there are many downloads and requests I may continue the development
Go directly and download or continue to more about it
I will not go into the details of the PowerShell script, but there are some inline comments, if you have any questions or comments just fire of an email or a comment below.
The download.xml file is where you define all the applications you want to be downloaded, eventually extracted, and imported into MDT and could look like this
<Download>
<DownloadItem>
<Comment></Comment>
<MDTFolderName>Productivity</MDTFolderName>
<FullName>Microsoft Office 365 ProPlus (2016)</FullName>
<ShortName>O365PP_2016</ShortName>
<Publisher>Microsoft</Publisher>
<Version>16.0.8529.3600</Version>
<DestinationFolder>O365PP_2016</DestinationFolder>
<DestinationFile>officedeploymenttool_8529.3600.exe</DestinationFile>
<CommandAfterDownload>officedeploymenttool_8529.3600.exe</CommandAfterDownload>
<CommandLineSwitchesAfterDownload>/extract:.\ /quiet</CommandLineSwitchesAfterDownload>
<URL>https://www.microsoft.com/en-us/download/details.aspx?id=49117</URL>
<CommandType>NONE</CommandType>
<Command>setup.exe</Command>
<CommandLineSwitches>/configure configuration.xml</CommandLineSwitches>
<VerifyAfterCommand></VerifyAfterCommand>
</DownloadItem>
<DownloadItem>
<Comment></Comment>
<MDTFolderName>Microsoft Core Apps</MDTFolderName>
<FullName>Microsoft Core Apps 2008 SP1 Redistributable Package (x86)</FullName>
<ShortName>VS2008X86SP1</ShortName>
<Publisher>Microsoft</Publisher>
<DestinationFolder>VS2008X86SP1</DestinationFolder>
<DestinationFile>vcredist_x86.exe</DestinationFile>
<URL> http://www.microsoft.com</URL>
<CommandType>NONE</CommandType>
<Command>vcredist_x86.exe</Command>
<CommandLineSwitches>/Q</CommandLineSwitches>
<VerifyAfterCommand></VerifyAfterCommand>
</DownloadItem>
</Download>
Find the source at Microsoft script gallery https://gallery.technet.microsoft.com/Bulk-and-import-application-712d9f0a