Monthly Archives: September 2012

LTI/ZTI PowerShell: Exit codes

When you run a script in your deployments, it’s good practice to let MDT/SCCM know how the script has ended. This will determine how your task sequence proceeds. You do this by exiting the script with a return code. I’ve … Continue reading

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

LTI/ZTI PowerShell: Debugging Scripts (Part 3 of 3)

Testings results with a test matrix My Rename-Computer script is in production and I’ve made some major changes to it so it’s time for some major testing.  It’s important when testing your scripts to understand and document what your expected … Continue reading

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

LTI/ZTI PowerShell: Debugging Scripts (Part 2 of 3)

Testing variables with the ZTIUtility module My Rename-Computer script worked great on a computer in a workgroup environment. But now, I have a new server that I want to rename before I join it to a domain. I’ve worked out … Continue reading

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

LTI/ZTI PowerShell: Debugging Scripts (Part 1 of 3)

Adding new functions and features to a perfectly good script is common practice. One example is my evolving Rename-Computer script. I want to modify the way it works (again) but I don’t want to rename my computer and join a … Continue reading

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

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: Trapping warning messages(again!)

Over the last few posts I’ve mentioned the dreaded warning message returned from your PowerShell scripts. To recap, here’s my Rename-Computer script and what happens at the end of the deployment. And this is what I get in the log … Continue reading

Posted in Uncategorized | 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