MDT: Refreshing computers with Static IP Addresses

No DHCP? No Problem

In this scenario, you have a computer with static IP Address assignments that you wish to maintain during a REFRESH.

There’s a Task Sequence step called Capture Network Settings. This runs the script ZTINICConfig.wsf that can capture network settings and store them in the Variables.dat file.

CaptureNIC

There are 2 switches of use here in the ZTINICConfig.wsf script. (From the manual)

/ForceCapture –  If there are any local networking adapters with static IP addresses saved, this script captures those settings and saves them to the local environment—for example, C:\MININT\SMSOSD\OSDLogs\Variables.dat. This script can be useful in capturing static IP settings for a large number of computers for automation.

/RestoreWithinWinPE – When specified, applies any saved static IP network settings to the local computer, when appropriate; used for internal processing only.

CaptureNIC-Params

Use both switches to capture adapter settings in a refresh.

About Andrew Barnes

A Scripting and Deployment Specialist.
This entry was posted in Deployment, MDT 2010, MDT 2012 and tagged , , , , . Bookmark the permalink.

16 Responses to MDT: Refreshing computers with Static IP Addresses

  1. Paolo says:

    is there a similar way to maintain the same computer name? I currently use a custom script to capture the name and set OSDComputerName

    Like

    • equinoxnet says:

      Select your Task Sequence | OS Info Tab | Edit Unattend.xml | 4 specialize — add component Microsoft-Windows-Shell-Setup_neutral. Then select Computername and type there %MACHINENAME%.
      Save xml, refresh deployment share and try 🙂

      Like

  2. Paolo says:

    nevermind, I tried without the userexit and the default value in a refresh scenario is the old computername

    Like

  3. senez yann says:

    is there a way to have a litetouchpe USB key with a static ip address?

    Like

  4. Gary says:

    Ok, assuming that does “Capture” the settings, how do you “Apply” them to the new install? Because “Apply Network Settings” doesn’t work.

    Like

  5. Gary says:

    It doesn’t. I end up with this error in the log…

    -![LOG[WMI Function: Adapter.EnableStatic(IPAddress,SubnetMask) FAILURE: -2147180508 Unknown Error: -2147180508]LOG]!–time=”14:01:40.000+000″ date=”07-25-2013″ component=”ZTINICConfig” context=”” type=”2″ thread=”” file=”ZTINICConfig”-

    Like

    • Do you have multiple static IP addresses on multiple adapters on the source machine?

      Like

      • Gary says:

        Not exactly. The machine I tested it on is a laptop, Latitude D630. The hard nic is static, the wireless nic is either DHCP or disabled, I don’t remember which. I haven’t tested it on a desktop yet because the 100 machines I will end up running this process on is a mix of both. Once this problem is resolved, I’ll run the test again on a desktop, but I need both to work.

        The whole process runs amazingly well from a thumb drive, except for setting the IPs. All desktops will have one nic set static, the laptops will have the hard nic set static and the wireless will either be DHCP or turned off.

        If we can get this resolved, I’ll be golden.

        Like

      • Gary says:

        Do you think I’d have to modify the script to include the second nic variables like you listed in:

        MDT 2012: Automating Network Interface Configuration

        …even if the wireless nic isn’t being used? (Which I’m sure its not)

        Like

      • Not unless you’re setting the 2nd card. Zip up and send me the logs.

        Like

      • Gary says:

        I’ll need somewhere to send it. PM me on twitter – gettps

        Like

      • My email is on my contacts page above.

        Like

  6. Jon Anderson says:

    Another trick I like to use to imitate static IP’s, which would also prevent this issue, is to create a DHCP reservation for the computer that you want to have a static IP. The benefits are centralized management of your static IP space combined with the flexibility and features of DHCP.

    I haven’t found any drawbacks… yet?

    Like

Leave a comment