Client Management Suite

 View Only
  • 1.  Imaging - Rename, join to domain/OU

    Posted Jan 19, 2016 03:26 PM

    Hello, 

     

    I am looking for the best way to achieve the following: 

     

    1- Bios name is set manually

    2- Machine is imaged

    3- Machine name is automatically set to match the Bios name set in step 1 

    4- Machine is automatically joined to the domain 

    5- Machine is joined to an OU based on the naming convention

     

    I am familiar with System Configuration tasks, but they are obviously not advanced to meet this criteria/conditions. 

     

    Would the best way be a powershell/VBScript script that runs post-imaging?

     

    Just wondering if somebody has some other ideas. Thank you! 



  • 2.  RE: Imaging - Rename, join to domain/OU

    Trusted Advisor
    Posted Jan 21, 2016 03:56 PM

    We use serial number for naming convention, probably not so helpful for you but our workflow is using managed deployment menu (tech PXE boots, then is presented with window to pick the right config).

    Config then

    Deploys hardware indep image job
    Renames to serial via script
    Copies drivers via script
    Reboot to Production where sysprep, etc completes and drivers are installed
    Install various software tasks one at a time (Adobe Acrobat Pro, Chrome, Bomgar client, etc)
    Gather HW and SW inventory task
    last step for us is apple system config task that dumps computer in correct OU based on the config the tech chose initially

    for the system config task - we set computer name to 'leave existing' domain to our company.com.  Below that fill in OU like Groups/Policy/OU (where OU is within Policy).  We set a computer account there with proper permissions to add computers to that OU (this can be tricky to get right).

    Let me know if you would find any of my scripts helpful



  • 3.  RE: Imaging - Rename, join to domain/OU

    Trusted Advisor
    Posted Jan 26, 2016 08:48 AM
      |   view attached

    I got a PM with more questions so answering here in case anyone else finds it helpful.

    Attached is script to change to serial number - note the first 2 lines may need to be edited.  I believe this script was based on sample script from DS - can't remember it's been years now that I've used it.  There may be a better way now.  I have this as a run script (vbs) task that runs in PXE 

    Regarding the question about dealing with different OUs, I have about 5 system config tasks that each go to their own OU using the system config task outline above.  These correspond to 5 different imaging configs the tech can choose from, each with one system config test.

    Example - tech chooses 'deploy image job 1' and this puts computer into OU1

    1) deploys hardware indep image job
    2) Renames to serial via script
    3) Copies drivers via script
    4) Reboot to Production where sysprep, etc completes and drivers are installed
    5) Install various software tasks one at a time (Adobe Acrobat Pro, Chrome, Bomgar client, etc)
    6) Gather HW and SW inventory task
    7) Runs system config task that drops computer into OU1

    Image job 2 (another option for techs to choose) goes to OU2 repeating all the steps above except instead of step 7, there's a different system config task that goes to OU2.  Steps 1-6 are otherwise identical among my image jobs using the same tasks.  This is helpful because if I update one task (such as updating my hardware independent image), I just update that one task and all of my image jobs update automatically.

    Let me know if you have more questions.

    Attachment(s)



  • 4.  RE: Imaging - Rename, join to domain/OU

    Posted Jan 26, 2016 05:51 PM
      |   view attached

    You can rename to serial (using a variable) and add to domain in the Apply System Config task...See screenshot.



  • 5.  RE: Imaging - Rename, join to domain/OU

    Trusted Advisor
    Posted Jan 27, 2016 11:09 AM

    thanks @tloenhorst, good info for me.  I knew I read the variable was added but was never sure how/where to use it.



  • 6.  RE: Imaging - Rename, join to domain/OU

    Posted Jan 27, 2016 03:33 PM

    Hello ! I though I would add a little bit of help here. We actually prompt the user for the machine name with the following script and then rename the computer directly in SQL:

     

    !--------------------------------------------Prompting for computer name-------------

    dim strNewName

    strNewName = InputBox("Enter the new full Computer Name for this system: (this is required)")

    if (strNewName <> "") then

    '   Set Connection = CreateObject("ADODB.Connection")

    '   Connection.Open "Provider=SQLOLEDB;Data Source=You SQL\Your SQL;Initial Catalog=Altiris database name;User ID=SQLUSERACCOUNT;Password=******;"

    '   Connection.Execute "UPDATE Inv_AeX_AC_Identification Set Name = '" & strNewName & "' Where Name = '%COMPNAME%'"

    '   Connection.Close

    Wscript.Echo "Computer Name:::::" & strNewName & "/////"
    Wscript.quit

    end if

    !------------------------------------------------------------------------------------

     

    We also prompt for type of computer, ie, 1 - Enduser, 2 - Conference room, 3 - Monitor lab, 4 - Observatory at the same time we ask for the computer name saving the numeric response. Each type of 'computer' represents an OU in the AD structure. Build a system configuration for all OU's you wish to join a computer to, build a query to request a response from your computer in winpe to respond which task server its connected to. Based upon that response a condition will assign the computer to the image job closest to the machine and after its finished add the computer to the OU in the task servers region (in AD).

    I understand this is a bit terse but, it should provide another idea of a framework you can build a centralized image job. This is for Deployment Solution 7.5, 7.6 not DS 6.9 .

     

     



  • 7.  RE: Imaging - Rename, join to domain/OU

    Trusted Advisor
    Posted Feb 19, 2016 09:18 AM

    @richietheprogrammer - lots of good info here - did you get what you needed?