With all the rules, conditions and WMI queries, MDT is already a very powerful tool. But sometimes you hit limitations during the gather process.
What if the vendor of your PC hardware has three different model names of the same hardware and you need a model mapping or model alias? Your serial number contains unneeded characters and needs to be truncated? Or in short, you need the ability to execute a custom VBS script.
MDT gives you this opportunity. It is a little bit misleading calling it UserExit script. You can define one (or more) scripts, which will then share its functions inside
Let's open an editor and create a file called
MDTUserExit.vbs. Copy the following code mentioned inside this VBS.
A UserExit script always needs the main function with name
Function UserExit(sType, sWhen, sDetail, bSkip) UserExit = Success End Function
But this basic function does not provide any logging. So you never know if
UserExit() was triggered...