Thursday, April 27, 2017

Import hosted Chocolatey packages into Microsoft Deployment Toolkit

For users of Microsoft Deployment Toolkit (MDT) the ability to separate applications from the OS during deployment is a great feature. It is a much easier way to manage and deploy packages during the imaging process. Thankfully for Chocolatey users, MDT allows admins to have applications that do not have source files, in this case just a command like "choco install dropbox -y".

Most organizations that use Chocolatey have their own hosted NuGet server which they use to deploy packages from. In this example I have setup a Chocolatey simple server. To see what packages are on your hosted server you can run "choco list --source<server>".

So if you are using MDT and host a NuGet server how can we quickly import all your packages into MDT? We can use the MDT PSSnapin and Chocolatey CLI.


In this example I have my own hosted NuGet server "nugetserver.domain.com". I create a new PS drive to my MDT share "MDT", use "choco list --source=nugetserver.domain.com" in order to get a list of my hosted packages and then loop through them to create an MDT application in the subfolder "test" for each package.

Just like that, Chocolatey deliciousness.


No comments:

Post a Comment

Windows 10 in-place upgrade with PowerShell and MDT

In this article, I will demonstrate how to use Microsoft Deployment Toolkit (MDT) and PowerShell to create a reusable in-place upgrade pr...