Using MDT scripts in SCCM without integration

November 30, 2011 - ConfigMgr/SCCM, System Center

Recently I was looking for a way to apply a specific task sequence step only to desktop machines. As it seems the wmi query for the chassistypes was not working in the task sequence, so I thought why not use the ZTIgather.wsf script from MDT?

as we have no direct need to integrate MDT, I just needed the functionality of the MDT scripts in SCCM.

Start by copying the MDT scripts and put them into a package.  you do not have to create a program for this package. put it on at least one DP.

Edit the TS:

– create a ‘run command line’ step: cscript.exe ZTIgather.wsf /localonly. browse and select your MDTscripts package.

(the localonly parameter is needed or this step will fail with return code 8000)

-in another existing step I have used the variable ‘IsDesktop’ to determine when to apply the step:

See, you do not have to reinvent the wheel again !