Adding MTU registry entry to several desktop PC's

Posted on 2006-04-17
Last Modified: 2008-01-09
I need to add the MTU registry entry to 300+ desktop PC's and am looking to do this without visiting each workstation.  The MTU reg entry is located at:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\[Interface ID]\

I know how to add the value to individual machines, my question is, can I add the MTU value via a logon script?  The first obstacle is that the Interface ID's will not be the same on each PC.  Any ideas?
Question by:CMCONE
    LVL 32

    Accepted Solution

    Do it through WMI Scripting. Here is an example which does it on the machine where it is run;

    On Error Resume Next

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set objNetworkSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration")

    Just save it in a file with .vbs extension and double click will set the MTU on that machine to 68.

    What you can do it is to include this as a logon script and run once for all the machines.

    LVL 1

    Author Comment

    Will this script set the MTU value only if MTU is already a valid key?  MTU is not currently a key listed on these systems.  Also, if a machine has more than one network adapter, will this script add the MTU key for all adapters (interface id's)?
    LVL 32

    Expert Comment

    Yes to both. It should. Why don't you try it on a machine?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
    It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now