[Deployment] Running PowerShell scripts as part of a task sequence

Both MDT 2010 Lite Touch and ConfigMgr 2007 run the same task sequencer.  This task sequencer can run any command that you want, just specify the command line to use.  That’s the simple part – the harder part is figuring out what this command line should do.  Often the command, a VBScript or PowerShell script, needs to get information from the task sequence itself, accessing variables in the task sequence environment.  Remember, these task sequence variables aren’t environment variables – they are distinctly separate, so you can’t use the PowerShell “Env:” drive.

If you are using MDT, building a VBScript that includes the ZTIUtility.vbs script makes accessing task sequence variables pretty simple, as you can then reference something like this in your script:...

Continued at:


Read the complete post at http://wmug.co.uk/blogs/cliffs_blog/archive/2009/09/22/deployment-running-powershell-scripts-as-part-of-a-task-sequence.aspx

Published Tuesday, September 22, 2009 3:35 AM by Cliff Hobbs - FAQShop.com and Microsoft MVP ConfigMgr/ SMS