Automation and Optimization

6 Shares

In this post I´m going to show you how to use one single Powershell script to install, configure and deploy any application with any OSD tool.

I´ve been working with the various Microsoft Deployment Toolkits for a very long time, and my Automation Framework is based upon the same. I consider myself a Batman doing most in batch scripts and also a bit unorganised in terms of structure.

Automation and Optimization 02

After talking to friends and customers at Citrix Synergy I realised that I need some better logging, specially when applications are installed via MDT. In some customer environments a MDT Task Sequence completed successfully, but some applications where still not installed.

Was the path wrong? Did I do something wrong? Do I need to sit around and watch? How long did it take?

The final thing that put me into this big time wasting project (short term) was the desire to reuse the MDT Application folder as a Chocolatey repository. WIth that in mind I created following the Powershell script wrapper which is also Chocolatey ready, Let´s jump into it.

In my last post The World´s Fastest Home Lab you learned how I now can deploy VM´s in 3 minutes and 20 seconds. So instead of wasting weeks on this project I only spent a couple of days. If you plan to build or upgrade your home lab, buy yourself an Intel 750 SSD PCIe. The double price is worth every penny and it seems to drop every week.

The Powershell Wrapper:

Much better file structure as well. I´m placing small vendors in Misc since it makes no sense to fill up the root folder with unknown vendor names.

Automation and Optimization 01

Quiet install command for MDT:

Automation and Optimization 05

There´s 2 log files created per application installation. One for the PS Wrapper where you will discover any problems with UNC path, MSI error or success code and total run time. The second is the actual application installation log file. Be aware that the MSI log cannot contain spaces, therefore only $Packagename.

Automation and Optimization 03

The cool thing about this script and the folder structure are that you only need to change the version number in the Powershell wrapper script to install a newer application version or roll back to an older version.

To create a NUPKG package just replace everything below the $Arguments with the Chocolatey logics:

Share your MDT Applications folder  and create an Environment variable in Group Policy.

Automation and Optimization 08

Automation and Optimization 07

To learn more check out the post Getting Started with Chocolatey and Boxstarter and How to Install Chocolatey Packages Offline.

All these updates and much more will be part of the Automation Framework 3.0 release coming soon.

6 Shares

Automation Framework Community Edition

The fastest way to build your lab environment.

Virtual Expo

Friday 30th of September 2022

Leave a Comment