Reason

NIC drivers needed to be kept in the right version to prevent network issue related with it. Such as broadcast/ multicast issue with the wrong driver, http://packetpushers.net/good-nics-bad-things-blast-ipv6-multicast-listener-discovery-queries/.

You can manually update if the network is too bad to deploy it through group policy, or else you can use the group policy to deploy the drivers.

In our case, we have most of the Dell OptiPlex 9020 with Intel I217-LM NIC. So the idea is use startup script to install the NIC driver for this model.

You can also find the models and the count in your network with this script:

 Script to find the PC models in your network
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | Out-Null # This function removes text between parentheses function massageModel { param([Parameter(Mandatory=$true)][string] $private:model) $private:model = $private:model -replace '\s*\([^)]+\)\s*$', '' $private:model = $private:model -replace '\s+$', '' return $private:model } # Create a WSUS object if (!$wsus) { $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer() } # Create a computer scope object and set the criteria to "All" update installation states # to target all computers in the WSUS database. $computerScope = New-Object Microsoft.UpdateServices.Administration.ComputerTargetScope $computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::All # Get all the computer objects $computers = $wsus.GetComputerTargets($computerScope) 'Found ' + $computers.Count + ' computers' # Initialize hash $models = @{} # Store "massaged" models in a hash (keys are unique) # and count the number of models. $computers | Foreach-Object { $model = massageModel $_.Model; $models.$model += 1 } 'Found ' + $models.count + ' unique models' # Output the data, sorted with the most common models # first and then alphabetically. $models.GetEnumerator() | Sort-Object -Property @{Expression='Value';Descending=$true},@{Expression='Name';Descending=$false} | Format-Table -AutoSize

Technology used:

  • WSUS
  • Group Policy (Win AD) startup script

 

  1. Download the Driver file (normally named Prowinxxxx.exe) from Intel
  2. Extract the file with 7zip, copy the extracted folder to a network share “\\bgl-mdc\installers\Drivers\Dell9020nicDriver03-17\NIC_22”, MAKE SURE THE COMPUTER HAVE READ PERMISSION to this folder, then browse to the subfolder “APPS\SETUP\SETUPBD\Winx64”, find the SetupBD.exe file.
  3. Create a powershell file, and the script is :
    $NICInfo=Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -eq "Intel(R) Ethernet Connection I217-LM"}
    $version=$NICInfo.Driverversion
    $versionstr=$version |Out-String
    $versionArray=$versionstr.Split(".")
    
    if ($NICInfo -ne $NULL -and [int]$versionArray[0] -lt 12)
        { "Major version is not latest! Driver needs to be updated"
        \\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr
        }
    elseif ($NICInfo -ne $NULL -and [int]$versionArray[0] -eq 12 -and [int]$versionArray[1] -lt 15)
        {"Minor version is not latest! Driver needs to be updated"
        \\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr
        }
    Else
        {" The NIC driver is up to date"}

    OR

    $NICInfo=Get-WmiObject Win32_PnPSignedDriver -cn computername| select devicename, driverversion | where {$_.devicename -eq "Intel(R) Ethernet Connection I217-LM"} 
    $current= new-object System.Version $NICInfo.Driverversion
    
    $new = new-object System.Version 12, 15
    
    if ($new.CompareTo($current) -gt 0) 
        {
        "NIC Driver version is not the latest! Driver needs to be updated" 
        \\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr 
        } 
    else
        {
        "no update required"
        }

    Change the “Intel(R) Ethernet Connection I217-LM” into your ethernet NIC model.
    The options for the command are:

    Base driver installation

    Command line options
    SetupBD.exe supports the following command line switches.

    Note You must include a space between switches.

     

    Option Description
    /s Silent installation with no reboot
    /r Force reboot (must be used with the /s switch)
    /nr No reboot (must be used with the /s switch—switch is ignored if included with the /r switch

     

    Examples

    Option Description
    SetupBD Installs and/or updates the driver(s) and displays the GUI
    SetupBD /s Installs and/or updates the driver(s) silently
    SetupBD /s /r Installs and/or updates the driver(s) silently and forces a reboot
    SetupBD /s /r /nr Installs and/or updates the driver(s) silently and forces a reboot (/nr is ignored)

     

    Other information

    • If you uninstall an adapter’s driver from Windows Device Manager*, you must reboot before using SetupBD.exe to install a new driver.
    • For drivers installed on a system with Intel® 5000 Series Chipset, the /s switch (silent install) forces a reboot without the /r switch. If you don’t want the system to reboot, use the /nr switch.
    • For Intel® I/O Acceleration Technology to function properly, you must reboot after driver installation.
    • You can use the /r and /nr switches only with a silent install, example: with the /s option.
  4. Create a Driver deployment Policy and add this script to the Computer startup script.
  5. Find the 9020 computers in the company, we can find this Apply this driver to the computer with this NIC model.
  6. Check if this is working, you can either check the Driver version in the Device manager, or go to the event viewer, the related log is as bellow:

 

 

Log Name:      System
Source:        e1dexpress
Date:          18/07/2017 11:53:33 AM
Event ID:      32
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      ANALYST1.BGL.local
Description:
Intel(R) Ethernet Connection I217-LM
 Network link has been established at 1Gbps full duplex.

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="e1dexpress" />
    <EventID Qualifiers="24580">32</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:33.061867500Z" />
    <EventRecordID>36377</EventRecordID>
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>Intel(R) Ethernet Connection I217-LM</Data>
    <Binary>0000040002003000000000002000046000000000000000000000000000000000000000000000000020000460</Binary>
  </EventData>
</Event>

Log Name:      System
Source:        Service Control Manager
Date:          18/07/2017 11:53:31 AM
Event ID:      7036
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      ANALYST1.BGL.local
Description:
The Windows Error Reporting Service service entered the running state.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
    <EventID Qualifiers="16384">7036</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8080000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:31.316089900Z" />
    <EventRecordID>36376</EventRecordID>
    <Correlation />
    <Execution ProcessID="676" ThreadID="1516" />
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="param1">Windows Error Reporting Service</Data>
    <Data Name="param2">running</Data>
    <Binary>5700650072005300760063002F0034000000</Binary>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-UserPnp
Date:          18/07/2017 11:53:29 AM
Event ID:      20001
Task Category: (7005)
Level:         Information
Keywords:      
User:          SYSTEM
Computer:      ANALYST1.BGL.local
Description:
Driver Management concluded the process to install driver FileRepository\e1d62x64.inf_amd64_neutral_1ddb802ed14889e3\e1d62x64.inf for Device Instance ID PCI\VEN_8086&DEV_153A&SUBSYS_05A41028&REV_04\3&11583659&0&C8 with the following status: 0x0.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-UserPnp" Guid="{96F4A050-7E31-453C-88BE-9634F4E02139}" />
    <EventID>20001</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>7005</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:29.476788500Z" />
    <EventRecordID>36375</EventRecordID>
    <Correlation />
    <Execution ProcessID="5356" ThreadID="5396" />
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <UserData>
    <InstallDeviceID xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://manifests.microsoft.com/win/2004/08/windows/userpnp">
      <DriverName>FileRepository\e1d62x64.inf_amd64_neutral_1ddb802ed14889e3\e1d62x64.inf</DriverName>
      <DriverVersion>12.15.25.6</DriverVersion>
      <DriverProvider>Intel</DriverProvider>
      <DeviceInstanceID>PCI\VEN_8086&amp;DEV_153A&amp;SUBSYS_05A41028&amp;REV_04\3&amp;11583659&amp;0&amp;C8</DeviceInstanceID>
      <SetupClass>{4D36E972-E325-11CE-BFC1-08002BE10318}</SetupClass>
      <RebootOption>false</RebootOption>
      <UpgradeDevice>true</UpgradeDevice>
      <IsDriverOEM>true</IsDriverOEM>
      <InstallStatus>0x0</InstallStatus>
      <DriverDescription>Intel(R) Ethernet Connection I217-LM</DriverDescription>
    </InstallDeviceID>
  </UserData>
</Event>

Log Name:      System
Source:        e1dexpress
Date:          18/07/2017 11:53:28 AM
Event ID:      27
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      ANALYST1.BGL.local
Description:
Intel(R) Ethernet Connection I217-LM
 Network link is disconnected.

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="e1dexpress" />
    <EventID Qualifiers="40964">27</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:28.681836200Z" />
    <EventRecordID>36374</EventRecordID>
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>Intel(R) Ethernet Connection I217-LM</Data>
    <Binary>0000040002003000000000001B0004A00000000000000000000000000000000000000000000000001B0004A0</Binary>
  </EventData>
</Event>

Log Name:      System
Source:        e1dexpress
Date:          18/07/2017 11:53:26 AM
Event ID:      27
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      ANALYST1.BGL.local
Description:
Intel(R) Ethernet Connection I217-LM
 Network link is disconnected.

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="e1dexpress" />
    <EventID Qualifiers="40964">27</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:26.936058600Z" />
    <EventRecordID>36373</EventRecordID>
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>Intel(R) Ethernet Connection I217-LM</Data>
    <Binary>0000040002003000000000001B0004A00000000000000000000000000000000000000000000000001B0004A0</Binary>
  </EventData>
</Event>



Log Name:      System
Source:        Service Control Manager
Date:          18/07/2017 11:53:24 AM
Event ID:      7042
Task Category: None
Level:         Information
Keywords:      Classic
User:          SYSTEM
Computer:      ANALYST1.BGL.local
Description:
The TCP/IP NetBIOS Helper service was successfully sent a stop control.

 The reason specified was: 0x40030011 [Operating System: Network Connectivity (Planned)]

 Comment: None
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
    <EventID Qualifiers="16384">7042</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8080000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:24.894122300Z" />
    <EventRecordID>36370</EventRecordID>
    <Correlation />
    <Execution ProcessID="676" ThreadID="816" />
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="param1">TCP/IP NetBIOS Helper</Data>
    <Data Name="param2">stop</Data>
    <Data Name="param3">0x40030011</Data>
    <Data Name="param4">Operating System: Network Connectivity (Planned)</Data>
    <Data Name="param5">None</Data>
  </EventData>
</Event>

Log Name:      System
Source:        e1dexpress
Date:          18/07/2017 11:53:24 AM
Event ID:      27
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      ANALYST1.BGL.local
Description:
Intel(R) Ethernet Connection I217-LM
 Network link is disconnected.

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="e1dexpress" />
    <EventID Qualifiers="40964">27</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-07-18T01:53:24.488852500Z" />
    <EventRecordID>36369</EventRecordID>
    <Channel>System</Channel>
    <Computer>ANALYST1.BGL.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>Intel(R) Ethernet Connection I217-LM</Data>
    <Binary>0000040002003000000000001B0004A00000000000000000000000000000000000000000000000001B0004A0</Binary>
  </EventData>
</Event>
Check the Driver version

If we compare the version with the latest version straightway with  -lt operator, the result may not be correct. Eg. Assume the latest one is 12.15.25.6, if the current one is 12.12.11.1, you will get the correct result; if the current is 12.6.47.0, you will get the wrong result, because the system just simply compare the number bit by bit from the left, 12 = 12, when comparing 12 and 6, because 6 > 1, system will treat 12.6.47.0 as a bigger version number.

The idea to solve this problem here is

  • The object property is still object by default, so we transfer the version number into string by out-string method,
  • Split it by period “.” ,so we have a array with 4 numbers in string.
  • Then transfer the string array to int and compare first two parts.
$NICInfo=Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -eq "Intel(R) Ethernet Connection I217-LM"}
$version=$NICInfo.Driverversion
$versionstr=$version |Out-String
$versionArray=$versionstr.Split(".")

if ($NICInfo -ne $NULL -and [int]$versionArray[0] -lt 15)
    { "Major version is not latest! Driver needs to be updated"
\\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr
}
elseif ($NICInfo -ne $NULL -and [int]$versionArray[0] -eq 15 -and [int]$versionArray[1] -lt 12)
    {"Minor version is not latest! Driver needs to be updated"
\\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr
}

OR use system.version

Note that the Format of the system.version is

Major    Minor     Build   Revision
----     ----      ----    ----

 

#get the current nic info from the computer specified by -cn. 
$NICInfo=Get-WmiObject Win32_PnPSignedDriver -cn computername| select devicename, driverversion | where {$_.devicename -eq "Intel(R) Ethernet Connection I217-LM"} 

#get the current NIC version in system.version format.
$current= new-object System.Version $NICInfo.Driverversion
echo $current
#To make the two variable $current and $new comparable, you need to specify in the same format. The new version is the version downloaded.
$new = new-object System.Version 12, 15,0,0

if ($new.CompareTo($current) -gt 0) 
 {
 "NIC Driver version is not the latest! Driver needs to be updated" 
 \\my-dc\installers\Drivers\Dell9020nicDriver03-17\NIC_22\APPS\SETUP\SETUPBD\Winx64\SetupBD.exe /s /nr 
 } 
else
 {
 "no update required"
 }

Result:

PS C:\>
Major Minor Build Revision
----- ----- ----- --------
23 21 13 8813 
no update required

 

Reference:

https://www.intel.com.au/content/www/au/en/support/network-and-i-o/ethernet-products/000005778.html

http://packetpushers.net/good-nics-bad-things-blast-ipv6-multicast-listener-discovery-queries/