none
machineobjectou and computername RRS feed

  • Question

  • I would like to add a newly deployed computer to a certain OU. We have Laptops and Pc's which we depoy to so if it is a laptop (computername is LTxxx and if it is a PC then computername is PCxxx. The computername is given in when the image is deployed. The first question when i deploy the images is the computername, the qeustion is set in the custom settings.

    How can i add  a laptop or pc to a certain OU in stead of the default computer OU in AD, without using the database of MDT?

    THe problem is that the name is given while deploying so something must be build to take that in the customsettings..I cannot write scripts and do not know how to pull it from the database, nor can i use the serialnumber from the computer.

    Is this to do in the customsettings?


    freddie

    Sunday, July 12, 2015 4:46 PM

All replies

  • Use ByLaptopType and ByDesktopType priority to define two different cases:

    https://mdtguy.wordpress.com/2013/10/07/automating-mdt-2012-laptops-vs-desktops/

    Sunday, July 12, 2015 6:48 PM
  • You can define that in CustomSettings:

    MachineObjectOU=

    You can also create a dropdown list in the Domain Membership wizard page. To do that in CustomSettings use:

    DomainOUs1=
    DomainOUs2=

    And so on with the numbers. You can have a "default" OU selected while using a dropdown list if you keep the MachineObjectOU= specified in the ini file. For the dropdown list to be visible, you cannot skip the Domain Membership page.

    Added Example

    [ByLaptopType]
    Subsection=Laptop-%IsLaptop%

    [Laptop-True]
    TaskSequenceID=WIN81X64L
    MachineObjectOU=OU=Laptops,OU=Computers-Offsite,FullOU...

    [ByDesktopType]
    Subsection=Laptop-%IsDesktop%

    [Desktop-True]
    TaskSequenceID=WIN81X64D
    MachineObjectOU=OU=Desktops,OU=Computers-Offsite,FullOU...


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



    • Edited by Dan_Vega Monday, July 13, 2015 8:45 PM
    • Proposed as answer by Dan_Vega Monday, July 20, 2015 1:11 PM
    Monday, July 13, 2015 6:10 PM
  • Looks good but i do not understand the meaning of these commands and wat to put in the machineobjectOU is this domain controllername full qualified domain name and cn or?

    [ByLaptopType]
    Subsection=Laptop-%IsLaptop%

    [Laptop-True]
    TaskSequenceID=WIN81X64L
    MachineObjectOU=OU=Laptops,OU=Computers-Offsite,FullOU...

    [ByDesktopType]
    Subsection=Laptop-%IsDesktop%

    [Desktop-True]
    TaskSequenceID=WIN81X64D
    MachineObjectOU=OU=Desktops,OU=Computers-Offsite,FullOU...


    freddie

    Friday, July 17, 2015 12:54 PM
  • %IsLaptop%: will either be return as True or False. Because you want laptops to have their own rules you create a Laptop-True subsection to specify those rules. The same goes for IsDesktop

    MachineObjectOU: You must specify the full OU and domain. Example: OU=Laptops,OU=Offsite,DC=microsoft,DC=com

    Computer naming convention. Let's say you wanted to include asset tags in your naming convention, it would look like this:

    [Laptop-True]
    OSDComputerName=LT%AssetTag%
    TaskSequenceID=WIN81X64L
    MachineObjectOU=OU=Laptops,OU=Offsite,DC=Microsoft,DC=com


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

    • Proposed as answer by Dan_Vega Monday, July 20, 2015 1:11 PM
    Friday, July 17, 2015 1:22 PM
  • Ok, im starting to get the hang of it but what is LT%assettag%? The name of the Laptop or PC is asked during deployment, i would like to use that to define of it is a Laptop or pc and according to that make use of a certain OU.

    During deployment i set the pc name as: LT999

    How can i use this in the above example? And where is the TaskSequence ID for i do not know in front which TS it will be?


    freddie

    Saturday, July 18, 2015 8:10 AM
  • Correct "LT%AssetTag%" would be the name. In this example I used the asset tag variable. If your machines have an asset tag stored in the BIOS, then MDT would grab that tag and append it to the LT, giving you a computer name such as LT123456. There are different variables you can use, you can look for other ways to use automatic numbering or you can manually enter a computer name during the wizard.

    You should already know what task sequence you want to use. For example, if all your laptops will be using an image you designed for them, you would list it in the "Laptop-True" sub-section. The ID will be the ID you gave it when you created the task sequence. Click on Task Sequences in MDT and the ID is listed next to the Name of the TS. If all your machines will use the same task sequence, then just list it in the Default section.

    The part you really want to focus on here is the MachineObjectOU so you can assign laptops and desktops to different OUs.


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

    Monday, July 20, 2015 1:11 PM
  • Hi,

    In mine situation it is a little bit complicated. We use images of departments. A image can be deployed to several hardware and to the same hardware. So i cannot use the number of the Task sequence because TS1 is use for LT and PC and TSb will also used for LT and PC...

    Which variable to use when laptop name is given in during deployment?


    freddie

    Monday, July 20, 2015 2:06 PM
  • That's not a problem, just manually choose your task sequence. As to which variable to use, that's entirely up to you. You don't even have to use a variable, I just included it as an example of what you could do.

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

    Monday, July 20, 2015 2:09 PM