none
MDT 2012 - Restoring hostname

    Question

  • Hello,

    Wondering if anyone has had any luck accomplishing this. I run a number of students labs and we are making the move from GHOST to MDT 2012 & WDS.

    We have DHCP reservation configured with the workstations (hostname, IP address & MAC address). Wondering if there is a TS or some script that would be used.

    Once the workstation is re-imaged I would like the workstation to retain its IP (will do this via DHCP reservation), but I would like the original hostname (ie LAB1-001-1) restored then the workstation to join our Production domain.

    I have just started reading up on the database connection option that comes with MDT. This might help me come up with a solution.

    Thank you

    ZT
    Saturday, January 19, 2013 2:19 AM

Answers

  •  I would like the original hostname (ie LAB1-001-1) restored then the workstation to join our Production domain.

    Hi there,

    You emailed me with this on Friday, not sure if u got my reply.

    To keep the same name set the OSDComputername to %computername% in the database.

    Automating the domain join is also pretty straightforward. example:

    JoinDomain=scriptimus.local
    DomainAdmin=ScriptimusPrime
    DomainAdminDomain=scriptimus.local
    DomainAdminPassword=H4rdP4$$0rd

    Optionaly, set the OU also:
    MachineObjectOU=OU=testlab,OU=computers,DC=scriptimus,DC=local

    Hope this helps.

    Also as Henrik says above, you could make a static entry in the MDT Database.

     

    Blog: http://scriptimus.wordpress.com


    • Edited by Andrew Barnes Sunday, January 20, 2013 1:45 PM
    • Marked as answer by ZoeTaite Wednesday, February 06, 2013 3:51 PM
    Sunday, January 20, 2013 1:36 PM

All replies

  • You could prepopulate the mdt database with the information about your computers.

    There are a lot of different script out there that can help you with this.

    Saturday, January 19, 2013 8:54 AM
  • I use an Exit script to do this...

    http://www.myitforum.com/absolutenm/templates/Articles.aspx?articleid=20734&zoneid=103

    and if you can use powershell to remove from AD, easy with winpe4/adk

    -tip

    Saturday, January 19, 2013 2:06 PM
  •  I would like the original hostname (ie LAB1-001-1) restored then the workstation to join our Production domain.

    Hi there,

    You emailed me with this on Friday, not sure if u got my reply.

    To keep the same name set the OSDComputername to %computername% in the database.

    Automating the domain join is also pretty straightforward. example:

    JoinDomain=scriptimus.local
    DomainAdmin=ScriptimusPrime
    DomainAdminDomain=scriptimus.local
    DomainAdminPassword=H4rdP4$$0rd

    Optionaly, set the OU also:
    MachineObjectOU=OU=testlab,OU=computers,DC=scriptimus,DC=local

    Hope this helps.

    Also as Henrik says above, you could make a static entry in the MDT Database.

     

    Blog: http://scriptimus.wordpress.com


    • Edited by Andrew Barnes Sunday, January 20, 2013 1:45 PM
    • Marked as answer by ZoeTaite Wednesday, February 06, 2013 3:51 PM
    Sunday, January 20, 2013 1:36 PM
  • Hey guy's...thanx for the responses!

    So, if I do make the entries static in the DB once the image is applied and the scripts start kicking off in theory the workstation should grab its original name if it is associated with say it's MAC address.

    ZT

    Tuesday, January 22, 2013 2:33 AM
  • Yes, there is a step in the task sequence named "Gather" which gathers deployment settings like the mac address, Model of the computer or if it is a virtual computer and it could also contact the MDT database for deployment settings. So it will ask the database for all the deployment settings for the MAC Address that it just found and you can set all kinds of settings there like static IP, product key or in your case the OSDComputerName setting
    Tuesday, January 22, 2013 6:40 AM
  • Hey guy's...thanx for the responses!

    So, if I do make the entries static in the DB once the image is applied and the scripts start kicking off in theory the workstation should grab its original name if it is associated with say it's MAC address.

    ZT

    You should create a test lab and test this out. It wont take long.

    Blog: http://scriptimus.wordpress.com

    Tuesday, January 22, 2013 9:45 AM
  • I am currently building a test environment to play around with these suggestions. Once I get this figured out or have additional questions :) I will close this topic out.

    Thanx again

    ZT

    Wednesday, January 30, 2013 2:36 PM
  • I've created a tool on Codeplex for building a testlab. It called the Hydration Kit - Test Lab: Base Configuration.

    Let me know if you need any more help.

    /Andrew


    Blog: http://scriptimus.wordpress.com

    Wednesday, January 30, 2013 7:49 PM
  • Henrik,

       What would the static entry look like in the DB? I would complete the following steps:

    1) Create a new computer - enter in MAC address

    2) Under the 'Details' tab enter in the 'OSDComputerNmae' = LAB-TEST01-01 (whatever the hostname should be specified? Assuming once the .ini is run and it finds the MAC address it then associates it to the hostname I have statical defined)

    3)  Assuming I could then fill in the NIC (static IP addressing).

    I have defined these settings in a test environment and updated the deployment share, but when I go into my 'customsettings.ini' file I don't see anything in there from the DB or any type of reference.

    Sorry for the confusion

    ZT

    Thursday, January 31, 2013 2:00 PM
  • Hi ZT,

    The database is a replacement for the customsettings.ini. 

    Once you create the DB, you then configure the DB rules. The CS.ini gets populated with information to connect to and reference the DB.

    Your Priority line should look something like this:

      Priority=CSettings, CRoles, RSettings, Default

    /Andrew


    Blog: http://scriptimus.wordpress.com

    Thursday, January 31, 2013 5:09 PM
  • Andrew,

       OK, making progress :) Once the CS.ini is updated will the WinPE read this even if it is a bare metal machine as long as you have the MAC address or UUID defined? I am making progress launching the 'litetouch.vbs' from a Windows environment.

    ZT

    Thursday, January 31, 2013 7:27 PM
  • I see it is processing the rules, but after the 'litetouch.vbs' script ran and the image was applied the following message appeared:

    ZTI error opening SQL Connection: [DBNETLIB][ConnectionOpen (Connect).]Specified SQL server not found. (-2147467259)

    There are an additional 9 errors. The SQL Express server is on the same domain using TCP/IP. Should it be set to 'Named Pipes'?

    Our environment right now is a complete pain as DHCP is setup to use 'reservation'. The IP address is matched to the MAC adddress.

    ZT

    Thursday, January 31, 2013 8:00 PM
  • This is just a test environment, so I created a local SQL user 'MDT2012' and gave it dbo over the MDT2012 db. I then updated my CS.ini file:

    [CSettings]
    SQLServer=PC-SQL2008-B
    Instance=SQLEXPRESS
    DBID=MDT2012
    DBPWD=******
    Database=MDT2012
    Netlib=DBMSSOCN
    SQLShare=MDTSQL2012
    Table=ComputerSettings
    Parameters=UUID, AssetTag, SerialNumber, MacAddress
    ParameterCondition=OR

    Tried running from a bare metal workstation, but still having issues connecting to the DB for whatever reason. I configured it using TCP/IP, but thinking of removing the setup and re-doing it using 'Named Pipes'?!? Starting to get this stuff a little more :)

    ZT

    Thursday, January 31, 2013 9:25 PM
  • You may need to create a firewall rule.

    See Mitch Tulloch's post http://www.windowsnetworking.com/articles-tutorials/windows-7/Deploying-Windows-7-Part15.html


    Blog: http://scriptimus.wordpress.com

    Thursday, January 31, 2013 11:13 PM
  • Andrew,

       Made a ton of progress. I ended up re-doing the db and using 'named pipes' and configuring the fw rules. I am now able to deploy using the db - yeah!

    One question though once my images are applied the final screen doesn't seem to pop-up stating if everything is good or if there are errors. If I look in the logs everything looks good. I thought even if everything installed correctly there would be some sort of visual display. This would be good when we are imaging the Labs (usually senior students handle this) that they receive some sort of visual diplay that it is now OK to sign into the workstation.

    ZT

    Monday, February 04, 2013 3:54 PM
  • Hi ZT,

    You should mark an answer above and start a new thread.

    Having said that, the final summary pane will not appear if you have SkipFinalSummary=YES in your customsettings.ini or set in one of your database rules.

    /Andrew



    Blog: http://scriptimus.wordpress.com

    Tuesday, February 05, 2013 12:32 AM