locked
How do I pass a Task sequence Variable over from an HTA to SCCM? Specifically OUPATH RRS feed

  • Question

  • I am trying to pass over a variable called OUPATH over from an hta file to SCCM during deployment. How do I ensure this works correctly, I am having to continually test and restart my Virtual Machines and redeploy which is eating up a large amount of time. I have my customsettings.ini file set to grab this info after it calls the webservice. The webservice has been tested and works.

    The java code looks like this below, but it obviously isn't working.

     function OUPath() 
    {
    var myVal = document.getElementById("ADOU").value;
    var outPut = "";
    switch (myVal) {
    case "1":
    outPut = "OU=Administrative,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "2":
    outPut = "OU=Development,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "3":
    outPut = "OU=External,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "4":
    outPut = "OU=IT,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "5":
    outPut = "OU=Restricted,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "6":
    outPut = "OU=Sales,OU=Workstations,DC=imo-online,DC=com";
    break;
    case "7":
    outPut = "OU=Service Computers,OU=Workstations,DC=imo-online,DC=com";
    break;
    }
    alert(outPut);
    }

    The ADOU comes from the hta file here.

    <td colspan=1 class="taskTableLeftCell">OU</td>
                
    <td class="taskTableSpanSecondAndThirdCell">
                    
    <select name="ADOU" id="ADOU">
      
    <option value="1">Administrative</option>
    <option value="2">Developement</option>
    <option value="3">External</option>
    <option value="4">IT</option>
    <option value="5">Restricted</option>
    <option value="6">Sales</option>
    <option value="7">Service Computers</option>
                    
    </select>
                
    </td>




    Monday, December 22, 2014 7:09 PM

All replies

  • If you only want to specify OU's, why not use the DomainOUList.xml

    http://bjtechnews.org/tag/domainoulist-xml/

    http://scriptimus.wordpress.com/2013/02/11/mdt-2012-domainous-list/

    Cheers!

    If you want to work with ts variables, you should use TSEnv:MachineObjectOU to my knowledge.


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Monday, December 22, 2014 10:35 PM