System Center Configuration Manager TechCenter > System Center Configuration Manager Forums > Configuration Manager SDK > OSD- Task sequence: Any one have vbscript to read the steps for Task sequence in SCCM
Ask a questionAsk a question
 

QuestionOSD- Task sequence: Any one have vbscript to read the steps for Task sequence in SCCM

  • Tuesday, August 25, 2009 10:21 AMRiju_gp Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi my query is to read the Task sequence and there corresponding Groups (Steps) which has been created inside the tasksequence editor. Any one faced or done similar thing using vbscript please help me.
    or
    If any one have any idea how we can export the Groups / Steps in Task sequence with the help of any script or any command line to be used to export the .xml file from teh Tasksequence Editor.

    Any help appreciated.... thank you

All Replies

  • Monday, October 12, 2009 10:08 AMBen Wood Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It's all in the SDK under Operating System Deployment Task Sequencing 

    Here is a direct link with some examples of enumerating a task sequence

    http://msdn.microsoft.com/en-us/library/cc145147.aspx and
    http://msdn.microsoft.com/en-us/library/cc144243.aspx

    You can import an xml using  http://msdn.microsoft.com/en-us/library/dd339673.aspx


  • Thursday, October 15, 2009 7:00 AMRiju_gp Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Ben,

    Tried above examples already...but no luck..
    getting error Type mismatch: 'objInParam.Properties_.Item'
    for ReadTaskSequence().

    Function ReadTaskSequence(connection, taskSequencePackage)
        ' Get the parameters object.
        Set packageClass = connection.Get("SMS_TaskSequencePackage")
           
        Set objInParam = packageClass.Methods_("GetSequence"). _
            inParameters.SpawnInstance_()
    
        ' Add the input parameters.
         objInParam.Properties_.Item("TaskSequencePackage") =  taskSequencePackage
    
        ' Get the sequence.
         Set objOutParams = connection.ExecMethod("SMS_TaskSequencePackage", "GetSequence", objInParam)
         Set ReadTaskSequence = objOutParams.TaskSequence
    End Function
    Hope the examples for enumerate the task sequence steps are not straight forward.

    If you have come across this kind of problem please help me to solve. Thx