none
MDT selecting OU RRS feed

  • Question

  • I would like to pick your  brain. I am doing an MDT win10 deployment....NO sccm. Would like to keep the process as generic as possible, no custom scripting if possible "those are the requirements and not my choice" 

    Currently there are two domains and the deployment tech has to manually type in the domain name in winpe. This is a requirement as well. Now the ask is to automate the computer OU. OU is based on the site code which is a state "and part of the Hostname" but first i need to get a domain name and then the site code and based on that info select an OU.
    So an example would be tech entered a domain ABC and the state i pick from the gateway.
     
    Then OU would be:
    ABCNY
     
    If tech typed in XYZ and the state is NY, then the OU would be:
    ZYXNY
     
    Is there a way to automate an OU based on what i have....with just MDT and no scripting?
     
    I know i could do it with the script and have done it before, but the ask is to do it with MDT?
     
    Database, customsetting.ini?
     
    Thank you.
    Thursday, May 4, 2017 1:22 PM

All replies

  • In custom settings you could use default gateway as a priority and then set your OU in the section for that gateway.

    Priority=DefaultGateway, Default
    
    [DefaultGateway]
    192.168.1.1=NY
    192.168.2.1=TX
    
    [NY]
    MachineObjectOU=OU=Computers,OU=NY,DC=Company,DC=COM
    
    [TX]
    MachineObjectOU=OU=Computers,OU=TX,DC=Company,DC=COM


    If this post is helpful please vote it as Helpful or click Mark for answer.

    • Proposed as answer by David Bloomer Friday, May 5, 2017 8:09 PM
    • Unproposed as answer by David Bloomer Friday, May 5, 2017 8:10 PM
    Thursday, May 4, 2017 3:17 PM
  • The problem is that i have two different domains in the same 

    DefaultGateway

    I am trying to use Set Task Sequence Variable to override 'MachineObjectOU'

    So far i can set a custom property to the value i need, but when i try to override 'MachineObjectOU'

    i am not getting any results.

    What am i missing here?

    Thursday, May 4, 2017 5:08 PM
  • Many MDT variables are designed to accept the first value they are assigned and not allow them to be changed.  Also, CustomSettings.ini is read BEFORE the wizard starts.  You need to use a different approach if you want user input from the wizard to be part of a variable.  Suggest seeing:  http://deploymentresearch.com/Research/Post/365/Creating-custom-variables-in-MDT-2013

    This may also be helpful though it is 2 years old:  https://blogs.technet.microsoft.com/deploymentguys/2015/07/02/dynamically-setting-variables-as-over-writable-during-gather/

    Thursday, May 4, 2017 9:08 PM
  • Another option is to have different task sequences (they can still use the same image) but within the task sequence you can set a TSV to override the OU.

    That allows you to customize the TS to be location specific, so within the TS you can have apps and whatnot that really only apply to that location/situation.


    If this post is helpful please vote it as Helpful or click Mark for answer.


    • Edited by Dan_Vega Friday, May 5, 2017 1:56 PM
    Friday, May 5, 2017 1:54 PM
  • That is what i ended up doing last night. 

    And then i condition that step

    if all are true

    domain name = ....

    sitecode=....

    Friday, May 5, 2017 2:53 PM