skullicious Posted June 23, 2014 Report post Posted June 23, 2014 Hey, I am looking at expanding on Niall's CM2012 Front End HTA and wanted to know if I what I was planning to do was possible as I'm finding it hard to find a resource that give me definitive answer. Basically what I want to do is: Modify the HTA to have two drop down boxes, one for role and one for OU. Have the drop downs display a list of roles passed back from Maik Koster's webservices using GETOUs and GETROLES. Be able to select these roles and pass these variables into the task sequence. Is this do-able? Is this the best way of doing it? I've seen mention of how to do this by manually setting which OU's are available but this seems like an administrative overhead every time OU's are added/changed. Any tips? Thanks! Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted June 24, 2014 Report post Posted June 24, 2014 I have tried to solve this in our HTA. Unfortunately the GETOU Routine is to slow in a forest with several hundred OUs. It's sitting there for like 5 minutes to return the OUs. So what i did was using the GETADSITES function. Our Client OUs have the same Syntax in the AD sites. So i was able to create the OUs by adding the AD site to predefined Client OUs in a simple loop and feed them to the drop down list. Based on the Clients Default Gateway and Hardware type (Laptop/Desktop) the correct locations OU will be preselected in the drop down box. Quote Share this post Link to post Share on other sites More sharing options...
skullicious Posted June 30, 2014 Report post Posted June 30, 2014 Hi Peter, Thanks for the pointers! I like the idea of it filtering result using Hardware Type... Do you have any code samples? Thanks! Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted July 1, 2014 Report post Posted July 1, 2014 OSD.zip No Problem. Here you go. 1 Quote Share this post Link to post Share on other sites More sharing options...
skullicious Posted July 2, 2014 Report post Posted July 2, 2014 Thanks so much Peter. Looks good! Quote Share this post Link to post Share on other sites More sharing options...
kkonovalov Posted January 7, 2015 Report post Posted January 7, 2015 I am trying to add this to my deployment as well but am running into errors. How should the domain field be entered? I have this: If ADOU.value = "1" Then oTSEnvironment("swn_ADOU") = "Administrative" 'msgbox("LDAP://OU=Administrative,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "2" Then oTSEnvironment("swn_ADOU") = "Developement" 'msgbox("LDAP://OU=Development,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "3" Then oTSEnvironment("swn_ADOU") = "External" 'msgbox("LDAP://OU=External,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "4" Then oTSEnvironment("swn_ADOU") = "IT" 'msgbox("LDAP://OU=IT,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Restricted" 'msgbox("LDAP://OU=Restricted,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Sales" 'msgbox("LDAP://OU=Sales,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' ElseIf ADOU.value = "5" Then oTSEnvironment("swn_ADOU") = "Service Computers" 'msgbox("LDAP://OU=Service_Computers,OU=Workstations,DC=online,DC=com: " & oTSEnvironment("swn_ADOU"))' End If Not sure what I am doing wrong. Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted January 8, 2015 Report post Posted January 8, 2015 What error are you running in to? Quote Share this post Link to post Share on other sites More sharing options...
kkonovalov Posted January 8, 2015 Report post Posted January 8, 2015 There is an error in the task sequence and I have to shut down the computer, if I continue it will not use the apply networking settings step and join no domain. I think my problem lies in my java backend code. Can you send me a snipit of the code you used in your java? Quote Share this post Link to post Share on other sites More sharing options...