Monthly Archives: December 2014

2014 – My year in review…

Published / by Rens Hollanders / Leave a Comment

Lasts day of the year, always a good day to look back and to look forward, to what’s been and what comes 🙂

In addition to last years review: 2013 – My year in review, MDT, MCT, Music, Vinyl, Concerts and more… I’ll start with the top 5 best read posts of this year:

  1. MDT – Unattended.xml, CustomSettings.ini, Task Sequence Variable, which setting takes precedence over which setting?
  2. Windows 8.1 – Installation of NetFx3 by command line will fail if language pack is installed
  3. Office 365 – Automatic deployment of Office 365 with MDT
  4. MDT 2013 – Configuring your environment for Bitlocker deployments with TPM, Windows 8.1 and MDT 2013
  5. OSD – Live from the field my ‘Best Practices’ for Operating System Deployment

Now lets talk numbers:


As you can see here, over the entire year. I had nearly 60k sessions. 41k unique visitors which generated 152k pageviews. That’s a staggering number for me, as I never expected this many people would visit my blog. Taking into account, that most of you stayed nearly for 1:30 minutes per session on my blog is incredible and I would like to thank you for all this.

Also it’s funny to see when the weekend kicks in, and when the working days are. Somewhere between March 13 and March 18 I lost my Google Analytics tracker due to the change of my websites theme.

If we are talking geographics, the United States, United Kingdom and the Netherlands are in the top three of visits by country:


Browsers, Google Chrome on top:


So I’m really dazzled by all these numbers, and I would like to thank you all for visiting my blog over in 2014.

But 2014 meant more for me, then just writing some posts about IT related stuff. We’ve sold our apartment which due to the financial crisis wasn’t really easy. It took nearly three years before it got sold. Bringing a huge sacrifice at this point, enabled us to buy our dream house only 8 months later, and now we finally have a house with a rooftop to shout it from 🙂

But 2014 was also a year of music, and for my fellow music enthusiast, I wanted to share my list of music for the year 2014:

  1. The War On Drugs – Lost In The Dream
  2. Royal Blood – Royal Blood
  3. Wovenhand – Refractory Obdurate
  4. Interpol – El Pintor
  5. Lana Del Rey – Ultraviolence (Deluxe)
  6. Amatorski – From Clay To Figures
  7. Damien Rice – My Favourite Faded Fantasy
  8. PAUW – PAUW – EP

Above are some of my top listed albums and EP’s from 2014, which are definitely worth a try If you haven’t heard from any of these bands (although I doubt the War on Drugs is unknown, since it occupied the radio-waves home and abroad throughout the entire year)

Well this leaves me to say and wish you all the very best in 2015, with health luck and love and have a safe New Years Eve.

Cheers! Rens


MDT – Add deployment information with PowerShell and perform a REFRESH scenario

Published / by Rens Hollanders / 8 Comments on MDT – Add deployment information with PowerShell and perform a REFRESH scenario

Hi, just a quick post about an idea I wanted to share with you all:

A request from a colleague -since we are using MDT to deploy our corporate machines- was to create a mechanism that prevents the re-partitioning and formatting of hard drives that have already been deployed with MDT.

Now this can easily be done by creating the following steps in your deployment task sequence:

figure 1.1: Set Task Sequence Variable – DeploymentType


As you can see above, the Task Sequence Variable “DeploymentType” will be set, during the execution of the task sequence. But how can we achieve this only happens if for example the machine has already been installed with MDT a previous time?

figure 1.2: Task Sequence Variable Condition


By setting a condition on this Task Sequence Variable. For example by checking if a certain file exists. Naturally it is key, that this file will be created at the first initial deployment of the machine, or the file is created manually afterwards. The reason why I check both C: and D: drive, is that within Windows PE, it may occur that sometimes your C: drive is detected as D: drive due to the “System Reserved” or “System” partition.

This way I’m always right.

Now, to generate a file for identification, I’ve created a powershell script, which dumps certain Task Sequence Variables queried by the ZTIGather.wsf script in a text file, together with a couple of WMI queries:

The script is pretty straight forward:

First it sets the invocation path, which is the path from where the script is called. Then it sets the variables which are needed as input for the script. And the cool thing is, since ZTIGather.wsf queries the entire machine, we can use the MDT Task Sequence Variables as input for our script, which will be dumped into the text file.

To determine the computername, I wanted to use the OSDComputerName task sequence variable, but strangely enough, it outputted the AssetTag instead, for this reason I used the WMI query:

And the same thing goes for the Windows Operating Sytem version:

And bitlocker recovery key:

I then just needed to format these results in a readable usable manner, to get all my variables straight.

Now that’s out of the way, I needed a folder to store this information in, but I don’t want to bother end-users looking into it. So I create a folder called “MDTRollout” and placed it in the root of C:\ and give it the “Hidden” attribute, also I perform a check if the folder itself does not exist, in that case it will be created.

The same thing goes for the text file which is automatically created, if it does not exist. And if the file exists, it will add the content, for example when the machine is reïnstalled for the 2nd, 3rd, or 50th time.

And now to show you the result:

figure 1.3: No folder present at first


figure 1.4: running the script


figure 1.5: Task Sequence has finished


figure 1.7: Contents of the DeploymentInfo.txt004

There you have it, a little usefull file which can be used to quickly evaluate the computer’s identity and configuration. Which on it’s turn, forms the basis to perform a MDT REFRESH scenario, instead of a NEWCOMPUTER scenario.

The script can be placed in the .\DeploymentShare\Scripts folder, and executed with a “Run Powershell Script” step from within the Task Sequence properties pane. You can call the script as following: “%Scriptroot%\MDT_DeploymentInfo.ps1”, the great thing about doing it this way, is that MDT handles the execution policy of powershell which would otherwise prevent the execution of the script. Normally it is necessary to set the policy to “Bypass” or “Unrestricted”.

figure 1.8: Calling the script


figure 1.9: Testing it yourself


Now to test the script yourself, a custom task sequence with the following two steps should do the trick:

  1. “Gather”
  2. “Run PowerShell Script”

Hope this can be of use to anyone else.

Find attached the screenshots used, and the actual script, which can be downloaded


Cheers and have great 2014/2015! Merry Christmas and a Happy New Year!!!!