Category Archives: Scripting

LTI/ZTI PowerShell: Testing Script Parameters

Before running a parameterised script in your deployments, it’s important to test that the tab completion is working. To do this, open a PowerShell console and type the script name and a hyphen then press the {tab} key. Your script … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , , | Leave a comment

LTI/ZTI PowerShell: Deployment Script logging

The task sequence step “Run PowerShell Script” has some cool features. One of which is the way it handles information returned from the Write-Host, Write-Warning and Write-Error cmdlets. MDT collects Information(Write-Host), Warnings(Write-Warning) and Errors(Write-Error) returned from a cmdlet in a … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , | 2 Comments

LTI/ZTI PowerShell: Comment Based Help

I recommend using PowerShell comment based help to document your deployment scripts as described on Technet in about_Comment_Based_Help. This makes your scripts self documenting so colleagues can see who wrote it, what it does and examples and parameter usage. Below, … Continue reading

Posted in Deployment, MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , , | Leave a comment

LTI/ZTI PowerShell: Using parameterised scripts in Task Sequences

There are methods in creating PowerShell scripts suitable for task sequence deployment. A good starting point is the Technet article about_Scripts. One of the most useful features of MDT/SCCM are the deployment properties. Today, I’m going to talk about using … Continue reading

Posted in MDT 2010, MDT 2012, SCCM, Scripting | Tagged , , , , , | Leave a comment

LTI/ZTI PowerShell: Accessing Task Sequence Variables

In order to create more useful scripts in your Lite/Zero-Touch deployments, you will need access to the deployment variables. In MDT 2012 you can now access these Task Sequence variables from 2 new PSDrives called TSEnv: and TSEnvList:. Now these drives … Continue reading

Posted in Deployment, MDT 2010, MDT 2012, SCCM, Scripting | Tagged , , , | 13 Comments

LTI/ZTI PowerShell: Using PowerShell in Task Sequences

Now that we’re in the golden age of PowerShell many administrators will want to take advantage of its features in their deployments. With Lite/Zero-Touch you can do this by using the Run PowerShell Script task sequence step. The great thing … Continue reading

Posted in Deployment, MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , | 5 Comments

MDT Powershell: Importing device drivers from organised folders

Below is my import drivers to MDT PowerShell script, also uploaded to the script repository here. My last post focused on creating a driverstore structure. Now it’s time to import your hard work into MDT. This script will import all your … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, Scripting | Tagged , , | 8 Comments

MDT PowerShell: Creating a New Deployment Share

When you perform Actions in MDT you can use the View Script function to replicate the PowerShell commands that you run. This is so you can store them in a custom script to build up your own automation task(s). Clicking … Continue reading

Posted in MDT 2012, PowerShell, Scripting | Tagged , , | Leave a comment

MDT PowerShell: New Module in MDT 2012

Microsoft Deployment Toolkit 2012 now comes with a PowerShell module in addition to the PSSnapIn used in previous versions. In earlier versions of PowerShell in order to start using the PowerShell cmdlets for MDT you would have to add the … Continue reading

Posted in MDT 2012, PowerShell, Scripting | Tagged , , | 1 Comment

MDT Scripting: Using VBScript Expressions in customsettings.ini file

I received an email from one of my readers: I’m trying to deploy to a mixed physical / VM environment using the serial number for the OSDComputername. However, on my VMs (VM Ware) the VM serial number is full of … Continue reading

Posted in MDT 2010, MDT 2012, Scripting | Tagged , , , | 12 Comments